http://www.perlmonks.org?node_id=11126743


in reply to Re^2: Signal handler - correct way to hijack TSTP
in thread Signal handler - correct way to hijack TSTP

I know about waitpid() that should fix that but am unsure of its correct use. Where to put it?

Put that into the signal handler for $SIG{CHLD} in the parent. This is the signal a process gets if a subprocess goes away. See perlipc.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'