Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Fix missing signals on Windows #5056

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,10 +731,6 @@
};

startup.processSignalHandlers = function() {
// Not supported on Windows.
if (process.platform === 'win32')
return;

// Load events module in order to access prototype elements on process like
// process.addListener.
var signalWraps = {};
Expand Down
12 changes: 5 additions & 7 deletions test/simple/test-signal-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.


// SIGUSR1 and SIGHUP are not supported on Windows
if (process.platform === 'win32') {
process.exit(0);
}

var common = require('../common');
var assert = require('assert');

Expand Down Expand Up @@ -65,7 +60,10 @@ process.on('SIGHUP', function() { sighup = true });
process.kill(process.pid, 'SIGHUP');

process.on('exit', function() {
assert.equal(1, first);
assert.equal(1, second);
// SIGUSR1 is not supported on Windows
if (process.platform !== 'win32') {
assert.equal(1, first);
assert.equal(1, second);
}
assert.equal(true, sighup);
});