You could kill INT, $pid; which is like hitting Ctrl-C. If the child is already gone, the signal will not be delivered to an unrelated process with the same pid. That shouldn't be a problem, anyway, if you are handling SIGCHLD.
Update: Re diotalevi's question, kill fails with EPERM if the real or effective uid of the sender is not root or the same as that of the $pid addressed. See 'man 2 kill'. It is true that one of the user's own processes could reacquire the child pid. That is why the SIGCHLD handler should arrange to note the death of $pid, so the issue of misdelivery never comes up.
After Compline,
Zaxo
In reply to Re: Killing wayward children
by Zaxo
in thread Killing wayward children
by SpaceAce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |