unregister_task(): Print what caused the task to shutdown.
authorAndre Noll <maan@systemlinux.org>
Tue, 1 Apr 2008 19:59:24 +0000 (21:59 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 1 Apr 2008 19:59:24 +0000 (21:59 +0200)
sched.c

diff --git a/sched.c b/sched.c
index b9d6428..9b0bddc 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -36,7 +36,8 @@ void unregister_task(struct task *t)
 {
        if (!initialized)
                return;
 {
        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)
        if (t->pre_select)
                list_del(&t->pre_select_node);
        if (t->post_select)