Mercurial > emacs
diff src/process.c @ 90786:ca12f314faac
Changes from arch/CVS synchronization
| author | Miles Bader <miles@gnu.org> |
|---|---|
| date | Sun, 18 Mar 2007 14:00:43 +0000 |
| parents | 8c2ef9d5d4a8 |
| children | 91bf6e05918b |
line wrap: on
line diff
--- a/src/process.c Mon Mar 12 00:42:43 2007 +0000 +++ b/src/process.c Sun Mar 18 14:00:43 2007 +0000 @@ -6401,16 +6401,12 @@ #define WUNTRACED 0 #endif /* no WUNTRACED */ /* Keep trying to get a status until we get a definitive result. */ - while (1) { - errno = 0; - pid = wait3 (&w, WNOHANG | WUNTRACED, 0); - if (! (pid < 0 && errno == EINTR)) - break; - /* avoid a busyloop: wait3 is a system call, so we do not want - to prevent the kernel from actually sending SIGCHLD to emacs - by asking for it all the time */ - sleep (1); - } + do + { + errno = 0; + pid = wait3 (&w, WNOHANG | WUNTRACED, 0); + } + while (pid < 0 && errno == EINTR); if (pid <= 0) {
