in reply to Open3 and bad gut feeling
well, i did a little investigation on select, and i found some interesting things you'll appreciate. for instance, select is only implemented on sockets in Win32. hrmm. also, open2/open3 cannot redirect input/output in a child process via fork in Win32. i'm afraid a lot of the code you have there is not doing anything useful.
here's a list of links for more information:
perlport
IO::Select on Windows
stdin-socket without fork()??
here's a test script to verify select is in fact, not working. can_write, can_read, and has_exception all come back undef on Win32... (see below)
i'm now working on a client / server solution for executing external programs and redirecting output using sockets. as soon as i have something solid, i'll be sure to post it, and /msg you with the node_id.#!/usr/bin/perl use IO::Select; # create typeglobs and add to selector $output_select = IO::Select->new( *CMD_ERR, *CMD_OUT, *CMD_IN ); # test selector methods $cnt = $output_select->count(); print "count: $cnt\n"; @bob = $output_select->handles(); print "list: @bob\n"; @bob = $output_select->can_write(10); print "write: @bob\n"; @bob = $output_select->can_read(10); print "read: @bob\n"; @bob = $output_select->has_exception(10); print "exception: @bob\n"; close(CMD_IN); close(CMD_OUT); close(CMD_ERR);
thank you for using microsoft ;-D
~Particle
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Open3 and bad gut feeling
by Random_Walk (Prior) on Mar 31, 2005 at 14:00 UTC | |
by particle (Vicar) on Apr 20, 2005 at 16:00 UTC |