Socket inheritance problem across exec.
Toft
toft@itvd.sel.sony.com
Wed Jun 5 17:41:00 GMT 2002
Hello,
I have a problem with keeping the redirecting of stdout to a socket
accross an exec() call.
I'm doing the following :
- Create a socket connection.
- Fork a child process
- Use dup2 to redirect stdout to the socket
- execle() the new process.
I expect the new process to redirect stdout to the inherited socket.
When I compile the program I'm exec'ing under cygwin this works
well - the called program redirects stdout to the socket.
When I compile the program I'm exec'ing with for instance a Borland
compiler I get no output whatsoever after the exec.
If I redirect stdout to a file, rather than a socket, both cases work
fine.
Is there any particular known problems with inheriting sockets over
exec ?
I checked - the FD_CLOEXEC flag is set correctly before the exec.
I'm ran this on both 98 & 2000 with same results. I just upgraded
to latest 1.3.10 release.
Rolf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list