http://www.perlmonks.org?node_id=998751


in reply to Re^2: Windows run an exe print its output and cut it off after a time
in thread Windows run an exe print its output and cut it off after a time

I thought alarm did work fine but the OP wrote "... alarm is not working in windows.". As I don't have a Windows Perl in front of me, I checked the doco. I wasn't trying to make any point by using the word emulated - that's just what the doco says: "alarm Emulated using timers ...".

Scrolling down the perlport page a bit after reading about alarm, I came across the open entry by chance. It seems the doco is just wrong with respect to piped open. perlport says it's "unsupported"; perlfork says it's "not yet implemented".

Thanks for the example code.

-- Ken

Replies are listed 'Best First'.
Re^4: Windows run an exe print its output and cut it off after a time
by BrowserUk (Patriarch) on Oct 12, 2012 at 17:40 UTC
    that's just what the doco says: "alarm Emulated using timers ...".

    In the sense that the OS has neither a native alarm API nor *nix-style signals, it is emulated.

    But then again, under modern versions of *nix including linux, the original form of alarm is also "emulated with timers", so not so different.

    perlport says it's "unsupported"; perlfork says it's "not yet implemented".

    A lot of those more obscure docs have never been updated to reflect the current state of play unfortunately.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong