|
|
| We don't bite newbies here... much | |
| PerlMonks |
How do I trap $SIG{INT} ( sigint aka Ctrl^c )?by crazyinsomniac (Prior) |
| on Jul 01, 2001 at 09:15 UTC ( [id://93004]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.crazyinsomniac has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (programs and processes)
I've got a commandline script, and I wanted to do some stuff before ending the program if somebody hit Ctrl^C.
I'm using ActivePerl and I've tried: I need to hit Ctrl^c twice to kill the program. If I add exit; or die; at the end of myhand, perl crashes (PERL caused an exception c0000026H in module KERNEL32.DLL at 015f:bff88510.).
How do I fix this?
which should be the same as my first example, but it also doesn't work (same errors as before). Originally posted as a Categorized Question.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||