dup3/O_CLOEXEC/F_DUPFD_CLOEXEC

Pierre A. Humblet phumblet@phumblet.no-ip.org
Mon Jan 18 03:35:00 GMT 2010


At 05:52 PM 1/15/2010, Pierre A. Humblet wrote:

>The scenario you describe (one packet only, with a long delay between accept
>and WSAEventSelect) could easily be tested to settle the matter.
>Put a sleep before fdsock !

To close the matter, I have done just that, putting a 60 s sleep in 
:accept4 between the call to Windows accept and fdsock. Packet 
doesn't get lost :)
Server:
2010_1_17.22:31:41 Listening
2010_1_17.22:32:43 Accepted
2010_1_17.22:32:43 Read 6 hello
Client:
2010_1_17.22:31:43 Connecting to localhost
2010_1_17.22:31:43 Connected to localhost
2010_1_17.22:31:43 Written 6 hello
2010_1_17.22:32:58 Exiting

Pierre



More information about the Cygwin-patches mailing list