in reply to Re: automatically killing all child processes created in a script
in thread automatically killing all child processes created in a script

But if httpd, for example, properly daemonizes and becomes the leader of its own new session, this method won't catch httpds I create, right?
  • Comment on Re^2: automatically killing all child processes created in a script

Replies are listed 'Best First'.
Re^3: automatically killing all child processes created in a script
by JavaFan (Canon) on Aug 22, 2009 at 00:56 UTC
    True.

    And if you cannot record the pid of a grandchild process, there's always a way for the grandchild to distance itself from the family tree. Double forking will leave its parent PID to be 1, so there's no way to find it by tracing the process tree. And it can escape from a process group.