unix: do not close invalid kqueue fd after fork
The kqueue documentation states that the file descriptor is not inherited by the child process. Hence, do not close it in uv_loop_fork to avoid tampering with a possibly valid file descriptor already opened by the child process. PR-URL: https://github.com/libuv/libuv/pull/1583 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
parent
5b0e1d75a2
commit
6a101e78e8
@ -65,7 +65,6 @@ static int uv__has_forked_with_cfrunloop;
|
||||
|
||||
int uv__io_fork(uv_loop_t* loop) {
|
||||
int err;
|
||||
uv__close(loop->backend_fd);
|
||||
loop->backend_fd = -1;
|
||||
err = uv__kqueue_init(loop);
|
||||
if (err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user