]> git.tue.mpg.de Git - paraslash.git/commitdiff
sched: Log task termination status.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 29 Oct 2016 20:23:14 +0000 (22:23 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 28 Dec 2016 14:16:05 +0000 (15:16 +0100)
This is generally useful information, so let's include it in the
log message.

sched.c

diff --git a/sched.c b/sched.c
index 1db9169b38b511918cc711fc28dcb667e1242e5f..bc301778f9a8c20d567db31b1b19f4c413fc0ed3 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);