Avoiding <exiting> processes on Ultrix
Doug Gwyn
gwyn at smoke.BRL.MIL
Sun Apr 9 11:50:49 AEST 1989
In article <520 at pan.UUCP> jw at pan.UUCP (Jamie Watson) writes:
>Is there any way under Ultrix (2.0 or later) to write a C program
>such that any child processes created by that program will exit,
>without hanging in an <exiting> status until the parent does a wait()
>for the child? Under SysV this is done with signal(SIGCLD, SIG_IGN);
>I have tried that under Ultrix, to no avail.
Ugh! NEVER use the SIGCLD kludge!
To create a child that will not become a long-lived zombie:
if ( fork() == 0 )
if ( fork() == 0 )
exec( whatever );
else
_exit( 0 );
Since the grandchild has no parent, whenever it terminates it will
be reaped by the "init" special process.
More information about the Comp.unix.questions
mailing list