test: fix test-vm-sigint flakiness · nodejs/node@93ac2ea

@@ -25,14 +25,14 @@ if (process.argv[2] === 'child') {

2525

}

26262727

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

}));

353132+

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);