in reply to Does a parent need to wait on a child killed using SIGKILL?

Does a parent need to wait on a child killed using SIGKILL?

Yes.
It can wait because it wouldn't know not to.
It must wait to free the resources the OS keeps in case the parent does wait.

(If the parent doesn't wait, the resources will be freed when the parent exits.)

What would happen in case it does wait on such a child that has been killed using SIGKILL?

The zombie would be freed and $? would indicate the cause of death (just as if it had exist successfully, exited with an error or killed by another signal).

  • Comment on Re: Does a parent need to wait on a child killed using SIGKILL?

Replies are listed 'Best First'.
Re^2: Does a parent need to wait on a child killed using SIGKILL?
by piyush (Novice) on Sep 19, 2009 at 15:25 UTC
    Thanks :)