changeset 3301:aaf396661221

(wait_for_termination): Add POSIX_SIGNALS alternative.
author Richard M. Stallman <rms@gnu.org>
date Sun, 30 May 1993 18:34:54 +0000
parents 3ac8efebf586
children 836e5b3e6fe6
files src/sysdep.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 */