| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
`child.stderr`, `child.stdin`, and `child.stdout` are `null`, not `undefined`, if the relevant `stdio` properties are set to anything other than 'pipe'.
`child.stderr`, `child.stdin`, and `child.stdout` are `null`, not `undefined`, if the relevant `stdio` properties are set to anything other than 'pipe'. PR-URL: #11949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
@vsemozhetbyt does this need backporting? At what time did it change? Are there unit tests asserting this behaviour? |
Sorry, something went wrong.
console.log(`// v8 ${process.versions.node}`);
const child = require('child_process').spawn(
'echo', { stdio: ['ignore', 'ignore', 'ignore'] }
);
console.log(child.stdin, child.stdout, child.stderr);// v8 4.8.1 null null null // v8 6.10.1 null null null // v8 7.7.4 null null null // v8 8.0.0-nightly20170321ab2d49bcac null null null There is a test checking the null. It seems it is rather old. |
Sorry, something went wrong.
|
OK, thanks, the docs can be (should be?) backported then, I labelled. |
Sorry, something went wrong.
`child.stderr`, `child.stdin`, and `child.stdout` are `null`, not `undefined`, if the relevant `stdio` properties are set to anything other than 'pipe'. PR-URL: #11949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
`child.stderr`, `child.stdin`, and `child.stdout` are `null`, not `undefined`, if the relevant `stdio` properties are set to anything other than 'pipe'. PR-URL: #11949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
`child.stderr`, `child.stdin`, and `child.stdout` are `null`, not `undefined`, if the relevant `stdio` properties are set to anything other than 'pipe'. PR-URL: #11949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
`child.stderr`, `child.stdin`, and `child.stdout` are `null`, not `undefined`, if the relevant `stdio` properties are set to anything other than 'pipe'. PR-URL: nodejs/node#11949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
doc, child_process
child.stderr, child.stdin, and child.stdout are null, not undefined, if the relevant stdio properties are set to anything other than 'pipe':
ChildProcess { domain: null, _events: {}, _eventsCount: 0, _maxListeners: undefined, _closesNeeded: 1, _closesGot: 0, connected: false, signalCode: null, exitCode: null, killed: false, spawnfile: 'echo', _handle: Process { owner: [Circular], onexit: [Function], pid: 4252 }, spawnargs: [ 'echo' ], pid: 4252, stdin: null, stdout: null, stderr: null, stdio: [ null, null, null ] }The relevant test checks null values.