xhe has asked for the wisdom of the Perl Monks concerning the following question:
This works on unix when I hit "CTRL_C", it print the message " I am catching the signals"; but on NT, when I hit "CTRL_C", the program just stop, but I couldn't see the message, that means the program didn't go to the signal handler.#!/usr/bin/perl $saw_sig = 0; $SIG{INT} = \&my_sig; sub my_sig{ print "I am catching the signals\n"; $saw_sig = 1; die; } while (1){ print "I am here\n"; }
So how can I handle the signals on WIN32?
Edit by dws to add <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: signal handler on NT
by BrowserUk (Patriarch) on Sep 17, 2002 at 19:19 UTC | |
by kabel (Chaplain) on Sep 17, 2002 at 21:02 UTC | |
by BrowserUk (Patriarch) on Sep 17, 2002 at 21:22 UTC | |
by kabel (Chaplain) on Sep 18, 2002 at 05:41 UTC | |
|
Re: signal handler on NT
by charnos (Friar) on Sep 17, 2002 at 19:24 UTC | |
by Aristotle (Chancellor) on Sep 17, 2002 at 21:37 UTC | |
|
Re: signal handler on NT
by DigitalKitty (Parson) on Sep 18, 2002 at 14:07 UTC | |
|
Re: signal handler on NT
by fglock (Vicar) on Sep 17, 2002 at 19:12 UTC | |
|
Re: signal handler on NT
by perrin (Chancellor) on Sep 17, 2002 at 19:10 UTC |