How to clear zombie children while parent still alive.

King Ables ables at lot.ACA.MCC.COM
Wed Mar 28 03:48:22 AEST 1990


>From article <1990Mar27.164632.18462 at ux1.cso.uiuc.edu>, by long at castor.csg.uiuc.edu (Junsheng Long):
> Is that possible to clear all zombie children while the parent
> is still in execution under SunOS?

Check the wait3() system call.  The child process stays in the process
table as a zombie until the parent waits on it and gets some indication
that it's died.  Yes, in your case you probably don't care.  Neither did
I, so I just called wait3(0,WNOHANG,0) to clear the condition on all
child zombie processes.
-----------------------------------------------------------------------------
King Ables                    Micro Electronics and Computer Technology Corp.
ables at mcc.com                 3500 W. Balcones Center Drive
+1 512 338 3749               Austin, TX  78759
-----------------------------------------------------------------------------



More information about the Comp.unix.wizards mailing list