|The stupid question is the question not asked|
stdin-socket without fork()??by gharris (Beadle)
|on Nov 09, 2000 at 01:23 UTC||Need Help??|
gharris has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying to create a script that will route data to/from stdin/out and a socket, without using fork() (Though there is preliminary support for fork() in the latest ActivePerl, I would rather avoid that route.)
I got select (IO::Select actually) to work great using two sockets, but select doesnt seem to like filehandles. So I tried this:
but that just blocks on the sysread(STDIN...
I thought about using the timeout option, but I don't want the script to pause in either direction.
The end purpose for this script is to establish a connection for ssh (as the ProxyCommand). I am adapting a script written by Simon Josefsson to work on Windows NT.
Thanks for any help,