+2004-08-18 David Daney <ddaney@avtrex.com>
+
+ * java/lang/natPosixProcess.cc (waitForSignal): Use sigsuspend
+ instead of sigwait.
+
2004-08-17 Michael Koch <konqueror@gmx.de>
* Makefile.am (AM_CXXFLAGS): Reformatted to make it more ease to read.
sigset_t mask;
// Wait for SIGCHLD
- sigemptyset (&mask);
- sigaddset (&mask, SIGCHLD);
+ pthread_sigmask (0, NULL, &mask);
+ sigdelset (&mask, SIGCHLD);
+ // Use sigsuspend() instead of sigwait() as sigwait() doesn't play
+ // nicely with the GC's use of signals.
+ int c = sigsuspend (&mask);
- int sig;
- int c = sigwait (&mask, &sig);
-
- if (c != 0)
+ if (c != -1)
+ goto error;
+ if (errno != EINTR)
goto error;
// All OK.
return;
error:
- throw new InternalError (JvNewStringUTF (strerror (c)));
+ throw new InternalError (JvNewStringUTF (strerror (errno)));
}
jboolean java::lang::ConcreteProcess$ProcessManager::reap ()