[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: fork()/exec() dumping
- From: Erik Mouw <J A K Mouw its tudelft nl>
- To: gtk-app-devel-list redhat com
- Subject: Re: fork()/exec() dumping
- Date: Wed, 23 Jun 99 11:56:02 +0200
On Tue, 22 Jun 1999 14:51:12 -0600 (MDT), gtk-app-devel-list@redhat.com (Michael J. Hammel) wrote:
> Thus spoke Erik Mouw
>> /* parent code: just wait for the child to exit */
>> /* you can also install a signal handler for SIGCHLD */
>> waitpid(pid, &status, WUNTRACED); /* anti zombie */
>
> You don't want to wait on the child if you exec(). You should do a SIG_IGN
> for children that call exec() or you'll end up with zombies.
True, but that only works with the System V SIGCLD signal. AFAIK, it is
not supported by the POSIX SIGCHLD (note the "H") signal. Since most
modern Unix variants claim to be POSIX complaint, you have to
wait()/waitpid() for the child.
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]