]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - sched.c
unregister_task(): Print what caused the task to shutdown.
[paraslash.git] / sched.c
diff --git a/sched.c b/sched.c
index 2500406005614dc3850a283e37057cc844608ac3..9b0bddc13e36d8fa9636c292b4c243e2e0416f86 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -36,13 +36,13 @@ void unregister_task(struct task *t)
 {
        if (!initialized)
                return;
-       PARA_INFO_LOG("unregistering %s (%p)\n", t->status, t);
+       PARA_INFO_LOG("unregistering %s (%s)\n", t->status,
+               t->error <0? para_strerror(-t->error) : "shutdown");
        if (t->pre_select)
                list_del(&t->pre_select_node);
        if (t->post_select)
                list_del(&t->post_select_node);
-       if (t->error >= 0)
-               t->error = -E_TASK_KILLED;
+       t->error = -E_TASK_UNREGISTERED;
 };