in reply to Re: launching another program but using the existing socket
in thread launching another program but using the existing socket
A couple of fairly minor points:
First, you probably want open FOO, ">&=$fileno" as using ">&$fileno" will dup() the file descriptor and then open a Perl file handle to it, leaving you with two file descriptors open to the same socket so that closing just the one doesn't shut down the connection.
Second, I recall recently someone discovering that sockets in Perl are never set to "close on exec" no matter what you do with $^F. I supposed you could consider this a feature, especially in this case. But I'd be a bit shy of depending on it until I found out why it is that way.
- tye (but my friends call me "Tye")
|
|---|