Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Unsupported function alarm

by mantra2006 (Hermit)
on Sep 20, 2006 at 20:11 UTC ( [id://573986]=perlquestion: print w/replies, xml ) Need Help??

mantra2006 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks

I am getting the following error when I run the program
The Unsupported function alarm function is unimplemented at FileWatch.pl line 101.
The version i am using is...
This is perl, v5.6.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2000, Larry Wall
Binary build 623 provided by ActiveState Tool Corp.
http://www.ActiveState.com
Built 16:27:07 Dec 15 2000

But when I run the same program in solaris machine it runs
without any error messages
The solaris version is
This is perl, version 5.005_03 built for sun4-solaris

Copyright 1987-1999, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Is there a version conflict using alarm function...i am using alarm function as
alarm($endsecs); local $SIG{'ALRM'}="TimeOut";
Thanks & Regards
Sridhar

Replies are listed 'Best First'.
Re: Unsupported function alarm
by jdtoronto (Prior) on Sep 20, 2006 at 20:25 UTC
    I don't think alarm was available that early in ActiveState Perl. You would need to contemplate upgrading. A lot has changed, certainly for Win32 users, since that version was built nearly six years ago.

    jdtoronto

        That's not entirely true:

        C:\>perl -le "$SIG{ALRM}=sub{print'Hello'};alarm(2);sleep 4;print 'Don +e.'" Hello Done. C:\>perl -v This is perl, v5.8.5 built for MSWin32-x86-multi-thread Copyright 1987-2004, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge.
        That must be very outdated. alarm interrupted sleep for me in ActivePerl 5.8.0 and 5.8.8 (but not in 5.6.1) on WinXP.
        That's a pretty old FAQ, alarm has been in ActiveState Perl since 5.8.

        jdtoronto

        Update Then I look further down and see ikegami already said that!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://573986]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2025-06-17 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.