diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-09-24 11:51:14 +0200 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2019-03-19 22:55:13 +0000 |
commit | ea5628e77ae12bdb34e4c1514261ea27c45f6562 (patch) | |
tree | b4b3894c23df7d3e18fd3b8eef6ca4efc5af181f /test/parallel | |
parent | 1a9582b7a66759d1c478f5b6b2adc91e39cc982a (diff) | |
download | node-new-ea5628e77ae12bdb34e4c1514261ea27c45f6562.tar.gz |
process: allow reading from stdout/stderr sockets
Allow reading from stdio streams that are conventionally
associated with process output, since this is only convention.
This involves disabling the oddness around closing stdio
streams. Its purpose is to prevent the file descriptors
0 through 2 from being closed, since doing so can lead
to information leaks when new file descriptors are being
opened; instead, not doing anything seems like a more
reasonable choice.
Fixes: https://github.com/nodejs/node/issues/21203
Backport-PR-URL: https://github.com/nodejs/node/pull/25351
PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js b/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js index d19b522e29..7cd4b90c00 100644 --- a/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js +++ b/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js @@ -24,9 +24,9 @@ function parent() { }); child.on('close', function(code, signal) { - assert(code); + assert.strictEqual(code, 0); + assert.strictEqual(err, ''); assert.strictEqual(out, 'foo'); - assert(/process\.stdout cannot be closed/.test(err)); console.log('ok'); }); } |