# HG changeset patch # User Richard M. Stallman # Date 738786894 0 # Node ID aaf39666122180c1384c026f668faa46b45abf67 # Parent 3ac8efebf586a02099b8cf47b380dff52b2ee360 (wait_for_termination): Add POSIX_SIGNALS alternative. diff -r 3ac8efebf586 -r aaf396661221 src/sysdep.c --- a/src/sysdep.c Sun May 30 18:24:08 1993 +0000 +++ b/src/sysdep.c Sun May 30 18:34:54 1993 +0000 @@ -339,6 +339,15 @@ 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 @@ 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 */