Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Signal Handling throws Core Dump

by cengineer (Pilgrim)
on Apr 25, 2007 at 15:29 UTC ( #612039=note: print w/replies, xml ) Need Help??


in reply to Signal Handling throws Core Dump

Not sure if it's a Solaris specific thing, but I used this on Linux with perl 5.8.8 and it works fine:

use sigtrap qw(handler sig_handler INT TERM QUIT PIPE); use Switch; sub sig_handler { my($sig) = shift; print "Caught signal $sig\n"; switch($sig) { case ["INT","TERM","QUIT"] { print "Exiting"; exit(0); } case "PIPE" { print "Continuing\n"; } } }

Replies are listed 'Best First'.
Re^2: Signal Handling throws Core Dump
by dsb (Chaplain) on Apr 25, 2007 at 15:50 UTC
    Used this method but get the same result. It seems like as soon as I try to do anything that I get the core dump.


    dsb
    This @ISA my( $cool ) %SIG

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2021-06-22 17:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (108 votes). Check out past polls.

    Notices?