summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-06-12 23:03:11 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-06-14 15:10:00 -0700
commit1ffdad010bdfc63c03b7291a7b80331e8ee7219c (patch)
tree15eb710314aa428ecd8a04366c3da055ba6fe466
parentd6072766ed7650c4f2a60c988df696d8fd41db8e (diff)
downloadnode-new-1ffdad010bdfc63c03b7291a7b80331e8ee7219c.tar.gz
Expose the FD numbers for stdin and stderr on process.binding("stdio")
-rw-r--r--src/node_stdio.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_stdio.cc b/src/node_stdio.cc
index 805de707c3..cf51556ff5 100644
--- a/src/node_stdio.cc
+++ b/src/node_stdio.cc
@@ -199,6 +199,8 @@ void Stdio::Initialize(v8::Handle<v8::Object> target) {
}
target->Set(String::NewSymbol("stdoutFD"), Integer::New(STDOUT_FILENO));
+ target->Set(String::NewSymbol("stderrFD"), Integer::New(STDERR_FILENO));
+ target->Set(String::NewSymbol("stdinFD"), Integer::New(STDIN_FILENO));
NODE_SET_METHOD(target, "writeError", WriteError);
NODE_SET_METHOD(target, "openStdin", OpenStdin);