Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 769b6c8

Browse filesBrowse files
santigimenoMylesBorins
authored andcommitted
test: fix flaky child-process-exec-kill-throws
Kill the child process with `SIGKILL` to make sure the child process does not remain alive. Fixes: #20139 PR-URL: #20213 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent e17280e commit 769b6c8
Copy full SHA for 769b6c8

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-child-process-exec-kill-throws.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-exec-kill-throws.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ if (process.argv[2] === 'child') {
1919
};
2020

2121
const cmd = `"${process.execPath}" "${__filename}" child`;
22-
const options = { maxBuffer: 0 };
22+
const options = { maxBuffer: 0, killSignal: 'SIGKILL' };
23+
2324
const child = cp.exec(cmd, options, common.mustCall((err, stdout, stderr) => {
2425
// Verify that if ChildProcess#kill() throws, the error is reported.
2526
assert.strictEqual(err.message, 'mock error', err);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.