From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22998 invoked by alias); 5 Oct 2006 17:02:25 -0000 Received: (qmail 22962 invoked by uid 48); 5 Oct 2006 17:02:24 -0000 Date: Thu, 05 Oct 2006 17:02:00 -0000 Message-ID: <20061005170224.22961.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libgcj/29324] add wait handling hook In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "daney at gcc dot gnu dot org" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q4/txt/msg00009.txt.bz2 List-Id: ------- 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