This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR 23763
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 08 Nov 2005 14:53:01 -0700
- Subject: Patch: FYI: PR 23763
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk and the 4.0 branch.
This is the patch from PR 23763, with the unnecessary signal() call
removed. The bug here is that we used to leave SIGCHLD blocked before
execing a child process, which could confuse some programs.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
PR libgcj/23763. From aeby@graeff.com.
* java/lang/natPosixProcess.cc (nativeSpawn): Unblock SIGCHLD
before exec.
Index: java/lang/natPosixProcess.cc
===================================================================
--- java/lang/natPosixProcess.cc (revision 106647)
+++ java/lang/natPosixProcess.cc (working copy)
@@ -1,6 +1,6 @@
// natPosixProcess.cc - Native side of POSIX process code.
-/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation
This file is part of libgcj.
@@ -345,6 +345,12 @@
}
}
+ // Make sure that SIGCHLD is unblocked for the new process.
+ sigset_t mask;
+ sigemptyset (&mask);
+ sigaddset (&mask, SIGCHLD);
+ sigprocmask (SIG_UNBLOCK, &mask, NULL);
+
execvp (args[0], args);
// Send the parent notification that the exec failed.