PR libgcj/23763. From aeby@graeff.com.
authorTom Tromey <tromey@redhat.com>
Tue, 8 Nov 2005 21:00:15 +0000 (21:00 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 8 Nov 2005 21:00:15 +0000 (21:00 +0000)
* java/lang/natPosixProcess.cc (nativeSpawn): Unblock SIGCHLD
before exec.

From-SVN: r106655

libjava/ChangeLog
libjava/java/lang/natPosixProcess.cc

index d9853c5ab54c9838ab6725b855c083fc24a60679..cceea20f5ca589f4178ed893f7294c195a9403df 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-08  Tom Tromey  <tromey@redhat.com>
+
+       PR libgcj/23763.  From aeby@graeff.com.
+       * java/lang/natPosixProcess.cc (nativeSpawn): Unblock SIGCHLD
+       before exec.
+
 2005-11-08  Mark Wielaard  <mark@klomp.org>
 
        * scripts/makemake.tcl: Set package gnu/javax/sound/midi to bc.
index cca768b6c6f53281ed21aec3cba23799438ca901..9a6c3218d4d1e6bb5c18c4fcce77b39b477d54d0 100644 (file)
@@ -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 @@ java::lang::ConcreteProcess::nativeSpawn ()
                }
            }
 
+         // 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.