The interrupt is only handled if I press "CTRL-C" on the console. Why doesn't the kill function send the appropriate signal?#!/usr/bin/perl -w sub my_sig_int_handler { open (OUT,">info.txt"); print OUT "Woo-Hoo!\n"; close(OUT); } my $oldSigInt = $SIG{INT}; $SIG{INT} = \&my_sig_int_handler; print "process $$\n"; sleep(3); kill 'INT', $$; sleep(5);
In reply to signal trapping by Seshouan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |