From: "Ng, Bill" <[EMAIL PROTECTED]>

> Anyone play with signal handlers on the Win32 platform?  Specifically,
> I'm trying to print a message when <CTRL-C> is pressed but I'm getting
> nowhere:
>
> This works on my linux box.  CTRL-C (while waiting for user input)
> prints "This works".  However, this doesn't work at all on my Win32 (XP)
> Platform (normal CTRL-C functionality remains).
>
> ------------------------
> local $SIG{INT} = sub { print "This works\n" };
> print my $a = <>;
> ------------------------
>

I have tried:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
E:\lucru\sig>perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 25 registered patches, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
Binary build 817 [257965] provided by ActiveState http://www.ActiveState.com
Built Mar 20 2006 17:54:25
E:\lucru\sig>perl sigtest.pl
[ I hit a Ctrl-C here]
This works
E:\lucru\sig>

So it works under Windows 2000 with perl 5.8.8 but there were some issues
with the signals under Windows with ActivePerl 5.8.8 build 816, so you need
to upgrade.


Teddy

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to