diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c index f3162c9d3e5..4611ce2c05c 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -6401,16 +6401,12 @@ sigchld_handler (signo) | |||
| 6401 | #define WUNTRACED 0 | 6401 | #define WUNTRACED 0 |
| 6402 | #endif /* no WUNTRACED */ | 6402 | #endif /* no WUNTRACED */ |
| 6403 | /* Keep trying to get a status until we get a definitive result. */ | 6403 | /* Keep trying to get a status until we get a definitive result. */ |
| 6404 | while (1) { | 6404 | do |
| 6405 | errno = 0; | 6405 | { |
| 6406 | pid = wait3 (&w, WNOHANG | WUNTRACED, 0); | 6406 | errno = 0; |
| 6407 | if (! (pid < 0 && errno == EINTR)) | 6407 | pid = wait3 (&w, WNOHANG | WUNTRACED, 0); |
| 6408 | break; | 6408 | } |
| 6409 | /* avoid a busyloop: wait3 is a system call, so we do not want | 6409 | while (pid < 0 && errno == EINTR); |
| 6410 | to prevent the kernel from actually sending SIGCHLD to emacs | ||
| 6411 | by asking for it all the time */ | ||
| 6412 | sleep (1); | ||
| 6413 | } | ||
| 6414 | 6410 | ||
| 6415 | if (pid <= 0) | 6411 | if (pid <= 0) |
| 6416 | { | 6412 | { |