From 449933623dff1e9911af113e4bf8183c7222facb Mon Sep 17 00:00:00 2001 From: jBarz Date: Mon, 12 Dec 2016 16:52:43 -0500 Subject: [PATCH] unix: use async-signal safe functions between fork and exec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/libuv/libuv/issues/998 PR-URL: https://github.com/libuv/libuv/pull/1167 Reviewed-By: Ben Noordhuis Reviewed-By: Santiago Gimeno Reviewed-By: Saúl Ibarra Corretgé --- src/unix/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/process.c b/src/unix/process.c index 45f5b452..f2fe3052 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -323,7 +323,7 @@ static void uv__process_child_init(const uv_process_options_t* options, } if (fd == use_fd) - uv__cloexec(use_fd, 0); + uv__cloexec_fcntl(use_fd, 0); else fd = dup2(use_fd, fd); @@ -333,7 +333,7 @@ static void uv__process_child_init(const uv_process_options_t* options, } if (fd <= 2) - uv__nonblock(fd, 0); + uv__nonblock_fcntl(fd, 0); if (close_fd >= stdio_count) uv__close(close_fd);