use handler function name if available when logging a worker process that has died.

This commit is contained in:
Joris Vink 2013-07-07 14:56:50 +02:00
parent 95bacb5690
commit 649e81afd7
1 changed files with 4 additions and 2 deletions

View File

@ -326,8 +326,10 @@ kore_worker_wait(int final)
if (WEXITSTATUS(status) || WTERMSIG(status) ||
WCOREDUMP(status)) {
kore_log(LOG_NOTICE,
"worker %d (pid: %d) (hdlr: %p) gone",
kw->id, kw->pid, kw->active_hdlr);
"worker %d (pid: %d) (hdlr: %s) gone",
kw->id, kw->pid,
(kw->active_hdlr != NULL) ? kw->active_hdlr->func :
"none");
if (kw->pid == accept_lock->lock)
accept_lock->lock = accept_lock->next;