#!/usr/bin/perl # just changing the shebang line to use perl 5.10.0 causes # it to seg fault when interrupted with Ctrl + C use strict; use warnings; $SIG{INT}=\&clean; sub clean { print 'caught'; } sleep 10; #### $ perl5.10.0 -v This is perl, v5.10.0 built for i686-linux-thread-multi (with 3 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 1002 [283697] provided by ActiveState http://www.ActiveState.com Built Jan 10 2008 07:35:18 ... #### $ cat /proc/version Linux version 2.6.18-128.7.1.el5 (mockbuild@hs20-bc2-3.build.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Aug 19 04:00:49 EDT 2009