This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

stderr should be EventEmitter even if it doesn't emit anything

  • Loading branch information...
ry committed Feb 7, 2011
1 parent 2e6a263 commit 3ec030535c5a289cefbca7881da2554ef276253d
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/node.js
View
@@ -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() {

0 comments on commit 3ec0305

Please sign in to comment.