Mercurial > emacs
diff src/process.c @ 90785:8c2ef9d5d4a8
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 662-669)
- Update from CVS
- Fix read-only prompt problem in isearch
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 207-208)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-184
| author | Miles Bader <miles@gnu.org> |
|---|---|
| date | Mon, 12 Mar 2007 00:42:43 +0000 |
| parents | c0e889bf140c deede4f7067d |
| children | ca12f314faac |
line wrap: on
line diff
--- a/src/process.c Fri Mar 09 03:30:57 2007 +0000 +++ b/src/process.c Mon Mar 12 00:42:43 2007 +0000 @@ -6401,12 +6401,16 @@ #define WUNTRACED 0 #endif /* no WUNTRACED */ /* Keep trying to get a status until we get a definitive result. */ - do - { - errno = 0; - pid = wait3 (&w, WNOHANG | WUNTRACED, 0); - } - while (pid < 0 && errno == EINTR); + 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); + } if (pid <= 0) {
