$sub = sub { exec "perl $0" }; $SIG{INT} = $sub; $SIG{USR1} = $sub; print ++$counter while 1; #### [matt@powerbook test] perl 440900.pl 1 2 3 4 ^C1 2 3 4 ^C5 ^C^C6 ^C^C7 ^C8 ^Z [1]+ Stopped perl 440900.pl