-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: #14957 PR-URL: #16839 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
1 parent
09c1f21
commit 22d4fef
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
require('../common'); | ||
const assert = require('assert'); | ||
const cp = require('child_process'); | ||
|
||
if (process.argv[2] === 'child') { | ||
// The following console.log() call is part of the test's functionality. | ||
console.log(process.ppid); | ||
} else { | ||
const child = cp.spawnSync(process.execPath, [__filename, 'child']); | ||
|
||
assert.strictEqual(child.status, 0); | ||
assert.strictEqual(child.signal, null); | ||
assert.strictEqual(+child.stdout.toString().trim(), process.pid); | ||
assert.strictEqual(child.stderr.toString().trim(), ''); | ||
} |