perl -le'$SIG{INT}='ignore'; system "./loop.sh"; print "command returned"; sleep 5; print "exiting"' #### #!/bin/sh while true do time; sleep 1; done