On Tue, 24 Feb 2004, Etienne Orliac wrote: > I have a problem when using a system() command inside a script using (or calling > another script using) Inline Octave. It seems that I get a zombie child process. The command is executed but never comes back to the main program.
I've taken a look at this. First, you could have tried to develop a shorter sample script. For example, the following illustrates the problem: use Inline Octave => q{ }; system "ls" A temprorary fix is to comment out lines 245,246 in Octave.pm: # $SIG{CHLD}= \&reap_interpreter; # $SIG{PIPE}= \&reap_interpreter; Here is where I want some help from the list. In Inline::Octave, I start a child octave process with IPC::Open3. I want to be able to catch the case when that child process dies, so I want to have a SIG{CHLD}. However, now any other processes forked will get reap_interpreter called. I don't want this. Currently I have sub reap_interpreter { my $pid= $octave_object->{octave_pid}; waitpid $pid,0; ### clean up return; } My question: How can I distinguish which processes sent SIG{CHLD} in &reap_interpreter? Andy