1.5.19-3 parent socket binding remains after closing when spawning child process
Martin
linkscrazy@yahoo.com
Fri Jan 20 17:01:00 GMT 2006
Well, this is a strange one.
I open a socket in a parent process, bind it and
listen.
I set the socket to close-on-exec with the FD_CLOEXEC
flag.
A child process is spawned, which doesn't inherit the
socket.
I then close the server socket in the parent process.
For a laugh, I attempt to connect to the port
associated with the server socket. I would expect
this connection request to fail, since I just closed
the socket. It doesn't.
The attached test case illustrates this.
Please let me know if I'm doing something wrong.
Thanks for your help.
Martin
__________________________________________________________
Find your next car at http://autos.yahoo.ca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.cpp
Type: application/octet-stream
Size: 2135 bytes
Desc: 317282840-test1.cpp
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060120/e519ed30/attachment.obj>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list