From 749501845cae1877a0b44a9ff86b6dbaa97fbc7c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 29 Oct 2016 22:23:14 +0200 Subject: [PATCH] sched: Log task termination status. This is generally useful information, so let's include it in the log message. --- sched.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sched.c b/sched.c index 1db9169b..bc301778 100644 --- 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); -- 2.39.5