[Bug 1358748] Re: socat fdout option will not open output file descriptor
Greg Lutostanski
1358748 at bugs.launchpad.net
Tue Aug 19 16:50:17 UTC 2014
Hi Hendrik!
Thanks for taking the time to report this!
Unfortunately it looks like you are using the unidirectional flag (-u);
from my experimenting it looks like when you pass this flag socat will
not deal with the unbound (from its perspective) file descriptors.
If you take out the -u, it will create a fd/4 for the child exec
process.
I checked this with a simple:
$ socat -d -d TCP4-LISTEN:2045,reuseaddr,fork EXEC:./script.sh,fdin=3,fdout=4 # and
$ ls -l /proc/`pgrep script.sh`/fd/ #to verify once I opened a connection with netcat, both 3 and 4 were there (with reading and writing to them respectively working).
Unless you have a particular reason to use unidirectional and have
output come from a different fd to stdout I recommend you rewrite the
script to use stdout (fd/1) as necessary; or don't use unidirectional.
I am closing the bug as Invalid as it seems like this is expected
behavior.
If you think I am wrong in this for any reason, please feel free to
reopen this bug and comment.
Thanks again for your time and thorough bug report!
** Changed in: socat (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to socat in Ubuntu.
https://bugs.launchpad.net/bugs/1358748
Title:
socat fdout option will not open output file descriptor
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/socat/+bug/1358748/+subscriptions
More information about the Ubuntu-server-bugs
mailing list