Currently the error code of the negative return value
from ->post_monitor() is not logged anywhere under normal
conditions. Instead we log "[dead]" in unlink_and_free_task(). Replace
this by a more meaningful message in task_reap().
static void unlink_and_free_task(struct task *t)
{
- PARA_INFO_LOG("freeing task %s (%s)\n", t->name, t->status < 0?
- para_strerror(-t->status) :
- (t->status == TS_DEAD? "[dead]" : "[running]"));
-
list_del(&t->node);
free(t->name);
free(t);
if (t->status >= 0)
return 0;
ret = t->status;
+ PARA_INFO_LOG("reaping %s (%s)\n", t->name, para_strerror(-ret));
/*
* With list_for_each_entry_safe() it is only safe to remove the
* _current_ list item. Since we are being called from the loop in