In "perlport - Writing portable Perl" in the Alphabetic list of Perl
Functions:
alarm SECONDS
alarm
Not implemented. (Win32)
I couldn't find anything in the ActiveState release notes that
contradicted that.
Bob McConnell
> -----Original Message-----
> From: Chas Owens [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 14, 2007 11:15 AM
> To: Bob McConnell
> Cc: [email protected]
> Subject: Re: Having trouble porting an application to MS-Windows
>
> On 6/14/07, Bob McConnell <[EMAIL PROTECTED]> wrote
> snip
> > On the Win32 platform, this form of select is only implemented for
> > sockets, and alarm() is not implemented at all.
> snip
>
> What makes you think the alarm function is not implemented? Running
> the following code with the latest version of ActiveState Perl on
> Windows XP works.
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> print localtime() . "\n";
> eval {
> local $SIG{ALRM} = sub { die "timeout\n" };
> alarm 3;
> while (1) {}
> };
> print $@ if $@;
> print localtime() . "\n";
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/