From 62a5679ca36febd64a2edcf6fac610793b0ffe98 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 17 Nov 2018 01:44:34 +0800 Subject: [PATCH] lib: set stderr._destroy to dummyDestroy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seems to be typo: we are setting stdout._destroy instead of stderr._destroy in the getter of stderr. PR-URL: https://github.com/nodejs/node/pull/24398 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso --- lib/internal/process/stdio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js index 826a2a9916e297..b769ea2bca04b9 100644 --- a/lib/internal/process/stdio.js +++ b/lib/internal/process/stdio.js @@ -32,7 +32,7 @@ function getMainThreadStdio() { stderr = createWritableStdioStream(2); stderr.destroySoon = stderr.destroy; // Override _destroy so that the fd is never actually closed. - stdout._destroy = dummyDestroy; + stderr._destroy = dummyDestroy; if (stderr.isTTY) { process.on('SIGWINCH', () => stderr._refreshSize()); }