sched: Log task termination status.
[paraslash.git] / sched.c
diff --git a/sched.c b/sched.c
index 1db9169..bc30177 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -66,7 +66,10 @@ static void sched_preselect(struct sched *s)
 
 static void unlink_and_free_task(struct task *t)
 {
-       PARA_INFO_LOG("freeing task %s\n", t->name);
+       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);