projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
830e38e
)
Fixed a bug in the waitpid version where it would return incorrectly if a
author
Jon Steinhart
<jon@fourwinds.com>
Wed, 20 Nov 2002 19:57:19 +0000
(19:57 +0000)
committer
Jon Steinhart
<jon@fourwinds.com>
Wed, 20 Nov 2002 19:57:19 +0000
(19:57 +0000)
child process was interrupted.
sbr/pidwait.c
patch
|
blob
|
history
diff --git
a/sbr/pidwait.c
b/sbr/pidwait.c
index
a1555bb
..
1572bfe
100644
(file)
--- a/
sbr/pidwait.c
+++ b/
sbr/pidwait.c
@@
-11,6
+11,7
@@
#include <h/mh.h>
#include <h/signals.h>
+#include <errno.h>
#include <signal.h>
#ifdef HAVE_SYS_WAIT_H
@@
-36,7
+37,8
@@
pidwait (pid_t id, int sigsok)
}
#ifdef HAVE_WAITPID
- pid = waitpid(id, &status, 0);
+ while ((pid = waitpid(id, &status, 0)) == -1 && errno == EINTR)
+ ;
#else
while ((pid = wait(&status)) != -1 && pid != id)
continue;