diff options
author | Richard Henderson <rth@redhat.com> | 2004-09-14 13:09:31 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-09-14 13:09:31 -0700 |
commit | 72826319ff3c180fd7c549a31b16167128c8945a (patch) | |
tree | 01aeb539a7cf89605b88803678a1dfa8d88ba69d /libjava | |
parent | 0393a68af01f1eb9b2a6753e76b308b4645a2f3c (diff) | |
download | gcc-72826319ff3c180fd7c549a31b16167128c8945a.zip gcc-72826319ff3c180fd7c549a31b16167128c8945a.tar.gz gcc-72826319ff3c180fd7c549a31b16167128c8945a.tar.bz2 |
natPosixProcess.cc (waitForSignal): Ignore return value of sigsuspend.
* java/lang/natPosixProcess.cc (waitForSignal): Ignore return
value of sigsuspend.
From-SVN: r87505
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/natPosixProcess.cc | 19 |
2 files changed, 13 insertions, 11 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 39a17af..2a3039e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +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> * javax/naming/CompoundName.java (CompoundName): Don't check for diff --git a/libjava/java/lang/natPosixProcess.cc b/libjava/java/lang/natPosixProcess.cc index a4b87c3..cca768b6 100644 --- a/libjava/java/lang/natPosixProcess.cc +++ b/libjava/java/lang/natPosixProcess.cc @@ -126,26 +126,23 @@ error: void java::lang::ConcreteProcess$ProcessManager::waitForSignal () { - using namespace java::lang; - - sigset_t mask; // Wait for SIGCHLD + sigset_t mask; 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); + sigsuspend (&mask); - if (c != -1) - goto error; - if (errno != EINTR) - goto error; + // Do not check sigsuspend return value. The only legitimate return + // is EINTR, but there is a known kernel bug affecting alpha-linux + // wrt sigsuspend+handler+sigreturn that can result in a return value + // of __NR_sigsuspend and errno unset. Don't fail unnecessarily on + // older kernel versions. // All OK. return; - -error: - throw new InternalError (JvNewStringUTF (strerror (errno))); } jboolean java::lang::ConcreteProcess$ProcessManager::reap () |