note
repson
When you exec another process it has access to any open
file-handles within your program whose system file desriptor
is within the value of $^F.
<p>The system uses file numbers 0=STDIN, 1=STDOUT, 2=STDERR and
anything else is higher.
<p>To open using just the fileno, first
discover the socket's using fileno($socket) or $socket->fileno
and pass that to the execed program on command line or with environment
variables.
<p>Then use the open syntax <code>open FOO, ">& $fileno";</code>
or whatever it is in the open documentation, or use
$fh = File::Handle->new_from_fd and $fh->fdopen with the fileno.
<p>Alternativly follow [nardo]'s advice because those filehandles are
always inherited by an exec'ed process and that will make the client program compatible with inetd.
98710
98710