I am running a perl script on a Linux host. I\'m trying to write a script that forks, where the child starts a program that takes forever and the parent times out after 5 s
Try killing the process group (use -$pid):
kill TERM => -$pid;
See perlipc.