Commit 720086cd by David Daney Committed by David Daney

natPosixProcess.cc (waitForSignal): Use sigsuspend instead of sigwait.

2004-08-18  David Daney  <ddaney@avtrex.com>

	* java/lang/natPosixProcess.cc (waitForSignal): Use sigsuspend
	instead of sigwait.

From-SVN: r86186
parent 3a4416fb
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.
......
......@@ -130,20 +130,22 @@ java::lang::ConcreteProcess$ProcessManager::waitForSignal ()
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 ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment