From 3ec030535c5a289cefbca7881da2554ef276253d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 7 Feb 2011 15:14:21 -0800 Subject: [PATCH] stderr should be EventEmitter even if it doesn't emit anything --- src/node.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/node.js b/src/node.js index 3841efb12d..d7ba4e83fc 100644 --- a/src/node.js +++ b/src/node.js @@ -153,12 +153,11 @@ return stdout; }); - var stderr = process.stderr = { - writable: true, - readable: false, - write: process.binding('stdio').writeError - }; - + var events = NativeModule.require('events'); + var stderr = process.stderr = new events.EventEmitter(); + stderr.writable = true; + stderr.readable = false; + stderr.write = process.binding('stdio').writeError; stderr.end = stderr.destroy = stderr.destroySoon = function() { }; process.__defineGetter__('stdin', function() {