----- Original Message ----- 
From: "SkyBlueshoes" <[EMAIL PROTECTED]>
To: "Ng, Bill" <[EMAIL PROTECTED]>
Cc: "Sisyphus" <[EMAIL PROTECTED]>;
<[email protected]>
Sent: Tuesday, May 09, 2006 1:18 PM
Subject: Re: Catch ctrl-c


> Ng, Bill wrote:
> > I've said this before ... I'm using build 817 and SIG{INT} isn't
> > catching anything.  Same exact code works fine on my Linux box and on
> > Win32 using 5.8.4.
> >
> > Bill
> >
> >
> > ----- Original Message -----
> > From: "SkyBlueshoes" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Sunday, May 07, 2006 4:38 PM
> > Subject: Catch ctrl-c
> >
> > Try catching it with:
> >
> >       $SIG{INT} = \&got_sig_int;
> >
> > ActiveState recommends that you *not* use build 816 as it was a bad
> > build -
> > best to update to build 817.
> >
> > Cheers,
> > Rob
>
> I've upgraded to the Build 817 also and I cannot catch $SIG{INT} either,
> but $SIG{QUIT} seems to work!
>

I tried the following which works fine for me on Windows 2000, build 817
(and every other build of perl that I have):

use warnings;

$SIG{INT} = \&my_handler;

$| = 1;

while(1) {
     print ".";
     sleep(1);
}

sub my_handler {print " Continuing on "}
__END__

Every time I hit Ctrl-C it just prints " continuing on ".

I installed the '.zip' - whereas I envisage that most others install the
'.msi'. I don't think that could account for the difference ... but I don't
know.

Cheers,
Rob

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

Reply via email to