FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: correct info in child_process.md by vsemozhetbyt · Pull Request #11949 · nodejs/node · GitHub

/ node Public

doc: correct info in child_process.md - #11949

Closed
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:child_process-md-stdio
Closed

doc: correct info in child_process.md#11949
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:child_process-md-stdio

Conversation

Copy link
Copy Markdown
Contributor
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':

console.log(
  require('child_process').spawn(
    'echo', { stdio: ['ignore', 'ignore', 'ignore'] }
  )
);
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.

nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Mar 20, 2017
`child.stderr`, `child.stdin`, and `child.stdout`
are `null`, not `undefined`, if the relevant `stdio` properties
are set to anything other than 'pipe'.
jasnell pushed a commit that referenced this pull request Mar 22, 2017
`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>

jasnell commented Mar 22, 2017

Copy link
Copy Markdown
Member

Landed in 76279cb

jasnell closed this Mar 22, 2017
vsemozhetbyt deleted the child_process-md-stdio branch March 22, 2017 16:27

Copy link
Copy Markdown
Contributor

@vsemozhetbyt does this need backporting? At what time did it change? Are there unit tests asserting this behaviour?

Copy link
Copy Markdown
Contributor Author

@sam-github

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.

Copy link
Copy Markdown
Contributor

OK, thanks, the docs can be (should be?) backported then, I labelled.

MylesBorins pushed a commit that referenced this pull request Mar 28, 2017
`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>
MylesBorins mentioned this pull request Mar 28, 2017
italoacasas mentioned this pull request Apr 10, 2017
2 tasks
MylesBorins pushed a commit that referenced this pull request Apr 18, 2017
`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>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
`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>
MylesBorins mentioned this pull request Apr 19, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL