Re: [gtk-list] Killing zombie children :-)



> Hi all
> 
> I have a gtk app that forks off a child process to handle some I/O, via
> pipes. While trying to make the arrangement more robust, the parent
> gets signalled when the child dies, and can successfully refork and
> continue. 
> 
> My problem is this: the original child hangs around as a zombie process.
> What should I do to prevent this? All pipes connected to the zombie child
> are closed upon the receipt of the SIGCHLD, and all events monitoring I/O
> from/to the child gets cancelled with gdk_input_remove().
> 
> Any more informed persons with a clue?

This might be a stupid question, but are you wait()'ing on the process in
your SIGCHLD handler?  If you don't you'll be left with zombies.

Brett.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]