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

In addition, you may want to wait to make sure the child is not running anymore, because the KILL might not kill it immediately.

  • 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 22, 2009 at 11:45 UTC
    ok ..thanks for your help.
    I made the parent wait for the forked process, after the forked process had been killed. The parent was able to receive the PID of the process that had already been killed using: kill -9 <PID>.
    The fact that parent received the PID of the killed child indicates that the parent must actually wait for a killed process as well ..only then would the resources consumed by the child process would be freed (ex. Entry in the process table etc.)

    Please let me know in case I am missing anything here ....Thanks again!