This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
fhandler_socket.cc has a handle leak: when several accept()'s are made on an AF_LOCAL parent socket, it accumulates secret_event handles. Also close on exec does not work properly on the secret_event when the call occurs after the event creation. The patch fixes both issues. For the close on exec, the event is always created with inheritance allowed, but the handle inheritance is set appropriately. I had to drop the ProtectHandle because of the changing inheritance. Pierre 2004-01-22 Pierre Humblet <pierre.humblet@ieee.org> * fhandler_socket.cc (fhandler_socket::create_secret_event): Avoid creating multiple handles. Always allow event inheritance but set the handle inheritance appropriately. Improve error handling. (fhandler_socket::check_peer_secret_event): Improve error handling. (fhandler_socket::close_secret_event): Simply call CloseHandle. (fhandler_socket::set_close_on_exec): Set secret event inheritance.
Attachment:
fhandler_socket.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |