Commit 72826319 by Richard Henderson Committed by Richard Henderson

natPosixProcess.cc (waitForSignal): Ignore return value of sigsuspend.

        * java/lang/natPosixProcess.cc (waitForSignal): Ignore return
        value of sigsuspend.

From-SVN: r87505
parent 0393a68a
2004-09-14 Richard Henderson <rth@redhat.com>
* java/lang/natPosixProcess.cc (waitForSignal): Ignore return
value of sigsuspend.
2004-09-12 Tom Tromey <tromey@redhat.com> 2004-09-12 Tom Tromey <tromey@redhat.com>
* javax/naming/CompoundName.java (CompoundName): Don't check for * javax/naming/CompoundName.java (CompoundName): Don't check for
......
...@@ -126,26 +126,23 @@ error: ...@@ -126,26 +126,23 @@ error:
void void
java::lang::ConcreteProcess$ProcessManager::waitForSignal () java::lang::ConcreteProcess$ProcessManager::waitForSignal ()
{ {
using namespace java::lang;
sigset_t mask;
// Wait for SIGCHLD // Wait for SIGCHLD
sigset_t mask;
pthread_sigmask (0, NULL, &mask); pthread_sigmask (0, NULL, &mask);
sigdelset (&mask, SIGCHLD); sigdelset (&mask, SIGCHLD);
// Use sigsuspend() instead of sigwait() as sigwait() doesn't play // Use sigsuspend() instead of sigwait() as sigwait() doesn't play
// nicely with the GC's use of signals. // nicely with the GC's use of signals.
int c = sigsuspend (&mask); sigsuspend (&mask);
if (c != -1) // Do not check sigsuspend return value. The only legitimate return
goto error; // is EINTR, but there is a known kernel bug affecting alpha-linux
if (errno != EINTR) // wrt sigsuspend+handler+sigreturn that can result in a return value
goto error; // of __NR_sigsuspend and errno unset. Don't fail unnecessarily on
// older kernel versions.
// All OK. // All OK.
return; return;
error:
throw new InternalError (JvNewStringUTF (strerror (errno)));
} }
jboolean java::lang::ConcreteProcess$ProcessManager::reap () 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