fix return value of para_reap_child()
authorAndre <maan@p133.(none)>
Tue, 20 Jun 2006 21:12:55 +0000 (23:12 +0200)
committerAndre <maan@p133.(none)>
Tue, 20 Jun 2006 21:12:55 +0000 (23:12 +0200)
In case of errors, this function returned 0 instead of -E_WAITPID.
Not a serious bug though.

signal.c

index 2d40d49..f9b95f9 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -89,7 +89,7 @@ pid_t para_reap_child(void)
        if (pid <= 0) {
                if (pid < 0)
                        pid = -E_WAITPID;
-               return 0;
+               return pid;
        }
        if (WIFEXITED(status))
                PARA_DEBUG_LOG("child %i exited. Exit status: %i\n", pid,