From 333dc03f8febb0ce03ecd82484522569415d4d34 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Fri, 13 Jun 2008 22:11:51 -0700 Subject: [PATCH] (waitpid -1 #f) now returns #f if no child has died yet. --- scheme/ikarus.posix.ss | 2 +- scheme/last-revision | 2 +- src/ikarus-process.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scheme/ikarus.posix.ss b/scheme/ikarus.posix.ss index e1af19d..a912292 100644 --- a/scheme/ikarus.posix.ss +++ b/scheme/ikarus.posix.ss @@ -122,7 +122,7 @@ (signal-code->signal-name (wstatus-received-signal r))) r] - [want-error? + [(and want-error? (not (eqv? r 0))) (error who (strerror r) pid)] [else #f]))])) diff --git a/scheme/last-revision b/scheme/last-revision index f34028d..c2257e8 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1515 +1516 diff --git a/src/ikarus-process.c b/src/ikarus-process.c index 1905c61..7dde9ed 100644 --- a/src/ikarus-process.c +++ b/src/ikarus-process.c @@ -193,11 +193,11 @@ ikrt_waitpid(ikptr rvec, ikptr pid, ikptr block /*, ikpcb* pcb */){ ref(rvec, off_record_data+2*wordsize) = ik_signal_num_to_code(WTERMSIG(status)); } - }else if(r == 0){ /* would have blocked */ - ; /* let rvec return as all #f's */ - }else { + return rvec; + } else if(r == 0){ /* would have blocked */ + return fix(0); + } else { return ik_errno_to_code(); } - return rvec; }