]> code.delx.au - gnu-emacs/commitdiff
(wait_for_termination): Add POSIX_SIGNALS alternative.
authorRichard M. Stallman <rms@gnu.org>
Sun, 30 May 1993 18:34:54 +0000 (18:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 30 May 1993 18:34:54 +0000 (18:34 +0000)
src/sysdep.c

index c067ffa499cb261dd03f1c712c358cecf9d1c00f..167b9c398a92ae96e58db8c4764b964f5c4276bb 100644 (file)
@@ -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 */