Try to put a signal handler in your program.
my $seen = 0;
$SIG{INT} = sub {$seen++;};
while(!$seen) {
#infinite loop
}
Teddy
----- Original Message -----
From: "Ted Zeng" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: marti, 20 decembrie 2005 00:52 AM
Subject: How to quit when Windows shut down?
Hi,
I have a perl script that runs in an infinite loop whenever a machine
starts.
My problem is, when I shut down the PC, Windows could not
Stop the script. It put the dialog asking if user wants to stop the process.
Is there a way in the script to quit automatically when Windows shut down?
Ted zeng
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs