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 d94063a

Browse filesBrowse files
santigimenocjihrig
authored andcommitted
test: fix test-vm-sigint flakiness
Set the `SIGUSR2` handler before spawning the child process to make sure the signal is always handled. Fixes: #7767 PR-URL: #7854 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 0a07201 commit d94063a
Copy full SHA for d94063a

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-vm-sigint.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-vm-sigint.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ if (process.argv[2] === 'child') {
2525
}
2626

2727
process.env.REPL_TEST_PPID = process.pid;
28-
const child = spawn(process.execPath, [ __filename, 'child' ], {
29-
stdio: [null, 'pipe', 'inherit']
30-
});
31-
3228
process.on('SIGUSR2', common.mustCall(() => {
3329
process.kill(child.pid, 'SIGINT');
3430
}));
3531

32+
const child = spawn(process.execPath, [ __filename, 'child' ], {
33+
stdio: [null, 'pipe', 'inherit']
34+
});
35+
3636
child.on('close', common.mustCall((code, signal) => {
3737
assert.strictEqual(signal, null);
3838
assert.strictEqual(code, 0);

0 commit comments

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