This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/29324] add wait handling hook
- From: "daney at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2006 17:02:24 -0000
- Subject: [Bug libgcj/29324] add wait handling hook
- References: <bug-29324-360@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from daney at gcc dot gnu dot org 2006-10-05 17:02 -------
Another idea:
In the SIGCHLD signal handler record the pid of the process that exited. Then
look it up in the pidToProcess map. If it belongs to the libgcj runtime, then
do waitpid(pid, ...) on it. Otherwise ignore it assuming it belongs to code
external to libgcj. It would be nice if we could call into libgcj from the
signal handler, but I don't think that we can. :(
You could get even fancier and chain the SIGCHLD signal handler to any handler
that may have been previously installed. We would expect the same of external
code that installed a SIGCHLD handler.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29324