Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Does IO::Select work? Anywhere?

by Athanasius (Abbot)
on Oct 21, 2012 at 10:09 UTC ( #1000191=note: print w/ replies, xml ) Need Help??


in reply to Re: Does IO::Select work? Anywhere?
in thread Does IO::Select work? Anywhere?

Doesn’t work for me.  :-(

I copied-and-pasted the code into a file named “344_SoPW.pl” and ran it with the following results:

19:46 >perl -c 344_SoPW.pl 344_SoPW.pl syntax OK 19:46 >perl 344_SoPW.pl syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors. syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors. Terminating on signal SIGINT(2) 19:47 >

(Had to Control-C as it just hung.) My configuration:

  • Windows Vista 32-bit
  • Strawberry perl 5, version 16, subversion 0 (v5.16.0) built for MSWin32-x86-multi-thread-64int
  • IO::Select v1.21
  • IPC::Open3 v1.12
  • Symbol v1.07

Hope this info is useful,

Athanasius <°(((><contra mundum


Comment on Re^2: Does IO::Select work? Anywhere?
Download Code
Replies are listed 'Best First'.
Re^3: Does IO::Select work? Anywhere?
by Anonymous Monk on Oct 21, 2012 at 10:30 UTC

    :) Really, you don't have /dev/null on windows? Use File::Spec->devnull

    naturally fixing those portability issues , select loop is forever

    use File::Spec(); sub launch { my ($id) = @_; open(local *TO_CHILD, '<', File::Spec->devnull ) or die $!; *TO_CHILD if 0; my $pid = open3( '<&TO_CHILD', my $from_child = gensym(), '>&STDERR', #~ perl => ( -e => 'use Time::HiRes qw( sleep ); $|=1; for (1..r +and(10)+5) { sleep(0.100 + rand(100)/1000); print "a" }' ), $^X => ( -e => 'use Time::HiRes qw( sleep ); $|=1; for (1..rand( +10)+5) { sleep(0.100 + rand(100)/1000); print q{a} }' ), ); return { id => $id, pid => $pid, pipe => $from_child, buf => '' }; }

    Perl version: v5.14.1 on MSWin32
    Carp               - 1.26
    Devel::VersionDump - 0.02
    Exporter           - 5.66
    File::Spec         - 3.33
    File::Spec::Unix   - 3.33
    File::Spec::Win32  - 3.33
    IO::Select         - 1.20
    IPC::Open3         - 1.09
    Symbol             - 1.07
    constant           - 1.21
    strict             - 1.04
    vars               - 1.02
    warnings           - 1.12
    warnings::register - 1.02
Re^3: Does IO::Select work? Anywhere?
by BrowserUk (Pope) on Oct 21, 2012 at 10:18 UTC
    Doesn’t work for me. ... Windows ...

    It won't. Pipe handles aren't selectable under windows -- which makes it a pretty useless demo for anyone who uses windows.


    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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-09-05 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (151 votes), past polls