in reply to Re^2: Does IO::Select work? Anywhere?
in thread Does IO::Select work? Anywhere?
:) 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
|
|---|