diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-05-30 18:34:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-05-30 18:34:54 +0000 |
commit | 9ab714c7b06a04e38d5d26b3beef45f138365b40 (patch) | |
tree | 9ee885dac6bbad7ca3c200d24da5f487a572433c /src/sysdep.c | |
parent | 1b4357f45235dffa968a5bf373a21ac318542cd9 (diff) | |
download | emacs-9ab714c7b06a04e38d5d26b3beef45f138365b40.tar.gz |
(wait_for_termination): Add POSIX_SIGNALS alternative.
Diffstat (limited to 'src/sysdep.c')
-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) break; wait (0); #else /* neither BSD nor UNIPLUS nor LINUX: random sysV */ +#ifdef POSIX_SIGNALS /* would this work for LINUX as well? */ + sigblock (sigmask (SIGCHLD)); + if (0 > kill (pid, 0)) + { + sigunblock (sigmask (SIGCHLD)); + break; + } + sigpause (sigmask (SIGCHLD)); +#else /* not POSIX_SIGNALS */ #ifdef HAVE_SYSV_SIGPAUSE sighold (SIGCHLD); if (0 > kill (pid, 0)) @@ -355,6 +364,7 @@ wait_for_termination (pid) we lose just one second. */ sleep (1); #endif /* not HAVE_SYSV_SIGPAUSE */ +#endif /* not POSIX_SIGNALS */ #endif /* not UNIPLUS */ #endif /* not BSD, and not HPUX version >= 6 */ #endif /* not VMS */ |