libuv/src
Ben Noordhuis 2138dd2f08
linux: fix thread cancellation fd leak
Same as the previous commit but this time for Linux.

Specifically, the glibc close() wrapper is a cancellation point;
the thread is unwound when close() is called when the thread is
in the "cancel" state.

That's according to spec and therefore arguably less severe than
MacOS's "EINTR without actually closing" behavior but we can avoid
the file descriptor leak altogether by sidestepping glibc and
making the system call directly.

Musl libc is unaffected, its close() wrapper doesn't check
the cancel state.

PR-URL: https://github.com/libuv/libuv/pull/2291
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-05-15 12:19:46 -04:00
..
unix linux: fix thread cancellation fd leak 2019-05-15 12:19:46 -04:00
win unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
fs-poll.c unix,win: fix uv_fs_poll_stop() when active 2019-05-06 15:02:01 +02:00
heap-inl.h
idna.c unix,win: support IDNA 2008 in uv_getaddrinfo() 2018-10-30 20:50:23 +01:00
idna.h unix,win: support IDNA 2008 in uv_getaddrinfo() 2018-10-30 20:50:23 +01:00
inet.c unix: harden string copying, introduce strscpy() 2018-12-04 17:08:09 +01:00
queue.h
strscpy.c unix: harden string copying, introduce strscpy() 2018-12-04 17:08:09 +01:00
strscpy.h unix: harden string copying, introduce strscpy() 2018-12-04 17:08:09 +01:00
threadpool.c unix,win: fix threadpool race condition 2018-10-07 15:50:57 -07:00
timer.c warnings: fix code that emits compiler warnings 2018-11-29 11:21:44 -05:00
uv-common.c unix: support sockaddr_un in uv_udp_send() 2019-04-11 11:04:43 -04:00
uv-common.h unix,win: add uv_fs_{open,read,close}dir() 2019-03-26 18:47:51 -04:00
uv-data-getter-setters.c test,sunos: fix statement not reached warnings 2019-03-16 13:22:16 -04:00
version.c