Browse Source

Allow signals to be used with process.on in addition to process.addListener.

v0.7.4-release
Brian 15 years ago
committed by Ryan Dahl
parent
commit
71009ad3fe
  1. 2
      src/node.js

2
src/node.js

@ -77,7 +77,7 @@ process.compile("(function (exports) {"
}; };
// Wrap addListener for the special signal types // Wrap addListener for the special signal types
process.addListener = function (type, listener) { process.on = process.addListener = function (type, listener) {
var ret = addListener.apply(this, arguments); var ret = addListener.apply(this, arguments);
if (isSignal(type)) { if (isSignal(type)) {
if (!signalWatchers.hasOwnProperty(type)) { if (!signalWatchers.hasOwnProperty(type)) {

Loading…
Cancel
Save