Wednesday, August 12, 2009

Ignore Ctrl-C in perl and shell scripts

Perl

Add to code :
$SIG{'INT'} = 'IGNORE';


Shell scripts

Add to code :
trap "" 1 2 3 15

No comments: