Question

I have tried to kill PPID process which terminate process (also kills child pid's) immediately sends signal back in seconds to one of my console, but child process are taking time to respond back termination response. Any one has any idea why it is happening..?

Was it helpful?

Solution

Whenever the parent process gets killed, the child processes become ORPHAN processes so the INIT process becomes the parent of the ORPHAN processes. As INIT process is created in such a way that whenever any process gets killed all of it's children are taken care by the INIT process until the processes finish.

OTHER TIPS

It looks like the parent process did not catch any signals, while the child processes did.

Alternatively, the child processes had resources open and are attempting a graceful exit, making sure those resources are properly taken care of.

In this case you may need to rewrite the parent process to catch the signal, forward it to its children, and then wait() for them to finish, and exit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top