1'use strict'; 2const common = require('../common'); 3if (!common.isWindows) 4 common.skip('test is windows specific'); 5 6const assert = require('assert'); 7const spawn = require('child_process').spawn; 8 9// This test makes sure that an aborted node process 10// exits with code 3 on Windows. 11// Spawn a child, force an abort, and then check the 12// exit code in the parent. 13 14if (process.argv[2] === 'child') { 15 process.abort(); 16} else { 17 const child = spawn(process.execPath, [__filename, 'child']); 18 child.on('exit', common.mustCall((code, signal) => { 19 assert.strictEqual(code, 134); 20 assert.strictEqual(signal, null); 21 })); 22} 23