summaryrefslogtreecommitdiff
path: root/lib/sockets.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-06-16 18:22:50 +0200
committerAndy Wingo <wingo@pobox.com>2011-06-16 19:47:25 +0200
commit3d458a81c64e4696157b23c7c4c4c150aa4a93b8 (patch)
tree1478fb3a9faaf203f517a8776f54d00884efdef6 /lib/sockets.c
parent0b77014f0c7d53b8bdbc7059c92f526560e1cacd (diff)
downloadguile-3d458a81c64e4696157b23c7c4c4c150aa4a93b8.tar.gz
gnulib update
Added pipe2 and open modules, to get O_CLOEXEC. * libguile/Makefile.am (guile_filter_doc_snarfage$(EXEEXT)): Add gnulib here, in the native build case, for rpl_fflush if needed. foo
Diffstat (limited to 'lib/sockets.c')
-rw-r--r--lib/sockets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sockets.c b/lib/sockets.c
index 25ab97f3d..432f3b584 100644
--- a/lib/sockets.c
+++ b/lib/sockets.c
@@ -37,6 +37,10 @@ close_fd_maybe_socket (const struct fd_hook *remaining_list,
gl_close_fn primary,
int fd)
{
+ /* Note about multithread-safety: There is a race condition where, between
+ our calls to closesocket() and the primary close(), some other thread
+ could make system calls that allocate precisely the same HANDLE value
+ as sock; then the primary close() would call CloseHandle() on it. */
SOCKET sock;
WSANETWORKEVENTS ev;