From 643c9e9c32895e166e372200779ed7d5b2365d18 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Thu, 31 Mar 2016 12:22:57 +0200 Subject: [PATCH] process: close process pipes safely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `uv__close__nocheckstdio` instead of `close`. PR-URL: https://github.com/libuv/libuv/pull/798 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig 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 02468e6e..ef10a342 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -530,9 +530,9 @@ error: if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM)) continue; if (pipes[i][0] != -1) - close(pipes[i][0]); + uv__close_nocheckstdio(pipes[i][0]); if (pipes[i][1] != -1) - close(pipes[i][1]); + uv__close_nocheckstdio(pipes[i][1]); } uv__free(pipes); }