in reply to Re: Re: Killing a process and, recursively, all its children
in thread Killing a process and, recursively, all its children

Assuming you have some sort of access to the POSIX layer (via XS, libraries, etc.) you can put your child processes in their own process group with setpgid:

The setpgid() and setpgrp2() system calls cause the process specified by pid to join an existing process group or create a new process group within the session of the calling process. The process group ID of the process whose process ID is pid is set to pgid. If pid is zero, the process ID of the calling process is used. If pgid is zero, the process ID of the indicated process is used. The process group ID of a session leader does not change.

You could have your parent proces set the process group of the children when it makes them and it should automatically propogate to any sub-children they make, etc. I think.