diff options
| author | Richard M. Stallman | 1993-05-30 18:34:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-30 18:34:54 +0000 |
| commit | 9ab714c7b06a04e38d5d26b3beef45f138365b40 (patch) | |
| tree | 9ee885dac6bbad7ca3c200d24da5f487a572433c | |
| parent | 1b4357f45235dffa968a5bf373a21ac318542cd9 (diff) | |
| download | emacs-9ab714c7b06a04e38d5d26b3beef45f138365b40.tar.gz emacs-9ab714c7b06a04e38d5d26b3beef45f138365b40.zip | |
(wait_for_termination): Add POSIX_SIGNALS alternative.
| -rw-r--r-- | src/sysdep.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index c067ffa499c..167b9c398a9 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -339,6 +339,15 @@ wait_for_termination (pid) | |||
| 339 | break; | 339 | break; |
| 340 | wait (0); | 340 | wait (0); |
| 341 | #else /* neither BSD nor UNIPLUS nor LINUX: random sysV */ | 341 | #else /* neither BSD nor UNIPLUS nor LINUX: random sysV */ |
| 342 | #ifdef POSIX_SIGNALS /* would this work for LINUX as well? */ | ||
| 343 | sigblock (sigmask (SIGCHLD)); | ||
| 344 | if (0 > kill (pid, 0)) | ||
| 345 | { | ||
| 346 | sigunblock (sigmask (SIGCHLD)); | ||
| 347 | break; | ||
| 348 | } | ||
| 349 | sigpause (sigmask (SIGCHLD)); | ||
| 350 | #else /* not POSIX_SIGNALS */ | ||
| 342 | #ifdef HAVE_SYSV_SIGPAUSE | 351 | #ifdef HAVE_SYSV_SIGPAUSE |
| 343 | sighold (SIGCHLD); | 352 | sighold (SIGCHLD); |
| 344 | if (0 > kill (pid, 0)) | 353 | if (0 > kill (pid, 0)) |
| @@ -355,6 +364,7 @@ wait_for_termination (pid) | |||
| 355 | we lose just one second. */ | 364 | we lose just one second. */ |
| 356 | sleep (1); | 365 | sleep (1); |
| 357 | #endif /* not HAVE_SYSV_SIGPAUSE */ | 366 | #endif /* not HAVE_SYSV_SIGPAUSE */ |
| 367 | #endif /* not POSIX_SIGNALS */ | ||
| 358 | #endif /* not UNIPLUS */ | 368 | #endif /* not UNIPLUS */ |
| 359 | #endif /* not BSD, and not HPUX version >= 6 */ | 369 | #endif /* not BSD, and not HPUX version >= 6 */ |
| 360 | #endif /* not VMS */ | 370 | #endif /* not VMS */ |