summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-02-21 15:26:35 -0800
committerisaacs <i@izs.me>2012-02-21 15:26:35 -0800
commit27d8b059fa214c56de6dc359ebdb8c05ad6b9f99 (patch)
treeed548b483ddd2c15ff7d5156c2cf6d187be547cd /src
parent5e3ca981556c305830553d006b76d5dcaaf49276 (diff)
downloadnode-27d8b059fa214c56de6dc359ebdb8c05ad6b9f99.tar.gz
Pause process.stdin in stdin getter
Otherwise, it'll be ref'ed, and keep the process hanging.
Diffstat (limited to 'src')
-rw-r--r--src/node.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node.js b/src/node.js
index ca5d39df0..8b7e7f9e1 100644
--- a/src/node.js
+++ b/src/node.js
@@ -324,6 +324,10 @@
// For supporting legacy API we put the FD here.
stdin.fd = fd;
+ // stdin starts out life in a paused state, but node doesn't
+ // know yet. Call pause() explicitly to unref() it.
+ stdin.pause();
+
return stdin;
});