A possible fix for bug #14333 with hanging at exit on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Thu, 29 Aug 2013 15:32:04 +0000 (18:32 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 29 Aug 2013 15:32:04 +0000 (18:32 +0300)
commit3f940c5aa6fc1d03e6658cda5c440fb6bd75e4c5
tree5729694efb5e29a00b9fad2f9c081d2198f3ccc9
parent20de2834a594370b2f30fa55932c9de3da6150ed
A possible fix for bug #14333 with hanging at exit on MS-Windows.

 src/w32.c (term_winsock): Call release_listen_threads before calling
 WSACleanup.
 (_sys_wait_accept): Wait for accept event in a loop with a finite
 timeout, instead of waiting indefinitely.  Will hopefully avoid
 hanging during exit because WSACleanup deadlocks waiting for the
 event object to be released.
 src/w32proc.c (release_listen_threads): New function, signals all
 the reader threads that listen for connections to stop waiting.
 src/w32.h (release_listen_threads): Add prototype.
src/ChangeLog
src/w32.c
src/w32.h
src/w32proc.c