Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Answer: How do I trap $SIG{INT} ( sigint aka Ctrl^c )?

by Anonymous Monk
on Feb 26, 2003 at 16:00 UTC ( #238807=categorized answer: print w/replies, xml ) Need Help??

Q&A > programs and processes > How do I trap $SIG{INT} ( sigint aka Ctrl^c )? - Answer contributed by Anonymous Monk

Instead of killing yourself, as suggested by crazyinsomniac, you could also try just exiting. This avoids the shell's response of 'aborted' when the program is killed. I.e.:

sub myhand
  print "\n caught $SIG{INT}",@_,"\n";

-Josh O-

  • Comment on Answer: How do I trap $SIG{INT} ( sigint aka Ctrl^c )?
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2016-10-23 11:08 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.