$ ./1.term.pl Sleeping 1 seconds ... Print finishing normally (sleep 1 completed) [1]+ Done gedit 1.term.pl $ ./1.term.pl Sleeping 1 seconds ... Print finishing normally (sleep 1 completed) $ ./1.term.pl Sleeping 3 seconds ... ^C $ cat cleanup_handler_log.txt DESTROY() called. Cleaning up... DESTROY() called. Cleaning up...