$SIG{'INT'} = 'stop_child'; sub stop_child{ print "Recieved stop signal.\n"; exit; }