$SIG{INT}=\&myhand; print "Parent pid = $$ \n"; $pid = open(CMD, "ping google.com -n 15 |"); print "Ping running... pid = $pid \n\n"; # uncommenting this line breaks ability to SIGINT #print ; # keep the script running; only the SIGINT will exit while (1){sleep 1}; sub myhand() { print "Parent $$ caught SIGINT.\n"; print "Parent $$ will KILL $pid.\n"; kill 9, $pid; exit(0); }