in reply to windows eval-timeout with alarm

I don't have much personal experience with perl on Win32 but in just looking around on the net, it appearsthe ActiveState didn't implement alarm() until version 5.8. An FAQ from version 5.6 lists alarm() as not being supported. The 5.8 version of that same FAQ still lists alarm() as not being supported but various posts on Google Groups indicate that this is incorrect. I don't have an easy way to test that but would be curious to know what version you're using.

HTH -- Brian

Replies are listed 'Best First'.
Re^2: windows eval-timeout with alarm
by BrowserUk (Patriarch) on Nov 05, 2004 at 13:24 UTC

    If alarm has worked on Win32, in any version 5.6.1 thru 5.8.4, I haven't managed to work out how.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
Re^2: windows eval-timeout with alarm
by disciple01 (Novice) on Nov 05, 2004 at 13:25 UTC
    Hi,

    Am running latest activestate perl, version 5.8.4.

    Using the alarm function doesn't throw up any errors or anyting. I know the fork function didn;t used to work properly in perl and now is which is why I thought the alarm function might be the issue.

    Still confused though, any simple alternatives to the above would be greatfully received :)

Re^2: windows eval-timeout with alarm
by vacant (Pilgrim) on Jan 24, 2005 at 22:12 UTC
    According to the ActivePerl documentation, signals are only "crudely" supported on Win32, and alarm() is not implemented at all in ActivePerl. However, I have used the method from "Programming Perl" (also found in "Perl Cookbook"), which uses both alarm signals and alarm(), in some CGI code. It doesn't work, but otherwise seems to do no harm on WindowsXP, and works properly unchanged on a Linux/Apache web server.

    HTH