]> sourceware.org Git - newlib-cygwin.git/commit
Try to handle concurrent close on socket more gracefully
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 15 Jun 2015 16:29:56 +0000 (18:29 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 15 Jun 2015 16:29:56 +0000 (18:29 +0200)
commit79d65a1ed2eccd7c9c280895b8dc99ff7112b3c0
treed15728d384376566f2a40feeb5eaca6195431e6a
parent6f9e2f3ed5ee1364dab6a47c604a6d7d370aab5c
Try to handle concurrent close on socket more gracefully

* fhandler_socket.cc (LOCK_EVENTS): Don't enter critical section with
invalid mutex handle since then socket has been closed.
(UNLOCK_EVENTS): Close critical section.
(fhandler_socket::evaluate_events): Handle calling connect on shutdown
socket.
(fhandler_socket::wait_for_events): Try for pthread_testcancel in case
of WAIT_FAILED.  Try to come up with a better errno in case we waited
on an invalid handle.
(fhandler_socket::release_events): Change wsock_mtx and wsock_evt to
NULL under lock to avoid accessing invalid handle.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_socket.cc
This page took 0.029862 seconds and 5 git commands to generate.