From 3d458a81c64e4696157b23c7c4c4c150aa4a93b8 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 16 Jun 2011 18:22:50 +0200 Subject: 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 --- lib/sockets.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sockets.c') 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; -- cgit v1.2.3