Need help spawning a child

Gary D. Wong gar at cory.Berkeley.EDU
Tue Jun 27 08:20:50 AEST 1989


>In article <873 at cbnewsl.ATT.COM> dune at cbnewsl.ATT.COM (Greg
>Pasquariello) writes:
>
>>Simply use signal() to ingnore the death of a child.  In SVR3.2 this will
>>have the desired effect of letting the child die without creating
>>zombies.

I have a very similar problem that envolves a programs that sleeps in the
background, using the sleep call.  When one of its children die, I want it
to wake up and perform some task, and go back to sleep. So I used signal
or sigset to call a signal handling function upon receiving SIGCLD. (This
is a SYS V box).  This results in a zombie being created.

My problem is, that to prevent a zombie process, I have to ignore SIGCLD with
sigignore(SIGCLD), and my parent process does not wake up.  Is there
any other way to prevent a zombie other than by ignoring SIGCLD?

Also, does anyone know what will happen to my sleeping process after the signal
handling call? Will it go back to sleep, or continue as if it were given 
the alarm signal? What would be the effect of having the signal handler
send the alarm signal to the process?

Thanks,

 Gary D. Wong  gar at cory.berkeley.edu  //   "It is better to remain silent   \\
 University of California, Berkeley   <<    and thought a fool, than to     >> 
 (415) 642-9304		              \\    open your mouth and confirm it" //
 Disclaimer: "Please, Colonel Hogan, I see NOTHING, I see NOOOTHINNNNNG!"



More information about the Comp.unix.questions mailing list