Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by Anonymous Monk
on Feb 26, 2003 at 16:00 UTC ( [id://238807]=note: print w/replies, xml ) Need Help??


in reply to How do I trap $SIG{INT} ( sigint aka Ctrl^c )?

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";
  exit(0);
}

-Josh O-

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://238807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-19 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found