diff --git a/test/parallel/test-vm-sigint.js b/test/parallel/test-vm-sigint.js index 2488b0d1c028f6..15d61d3232871a 100644 --- a/test/parallel/test-vm-sigint.js +++ b/test/parallel/test-vm-sigint.js @@ -25,14 +25,14 @@ if (process.argv[2] === 'child') { } process.env.REPL_TEST_PPID = process.pid; -const child = spawn(process.execPath, [ __filename, 'child' ], { - stdio: [null, 'pipe', 'inherit'] -}); - process.on('SIGUSR2', common.mustCall(() => { process.kill(child.pid, 'SIGINT'); })); +const child = spawn(process.execPath, [ __filename, 'child' ], { + stdio: [null, 'pipe', 'inherit'] +}); + child.on('close', common.mustCall((code, signal) => { assert.strictEqual(signal, null); assert.strictEqual(code, 0);