Interrupt is a perl module that watches for signals from the user within a perl program.
Interrupt gives simple handling of signals. It gives a graceful return when a user issues any sort of signal to exit. Full details are in the POD in the perl module.
use Interrupt;
$SIG{'INT' } = \&interrupt;
$SIG{'QUIT'} = \&interrupt;
$SIG{'HUP' } = \&interrupt;
$SIG{'TRAP'} = \&interrupt;
$SIG{'ABRT'} = \&interrupt;
$SIG{'STOP'} = \&interrupt;
$SIG{'IOT'} = \&interrupt;
$SIG{'TERM'} = \&interrupt;
$SIG{'KILL'} = \&interrupt;
The distribution files are here with RPMS or tarballs: