projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2035612
)
stdout should be writable only
author
Ryan Dahl
<ry@tinyclouds.org>
Wed, 28 Apr 2010 01:45:10 +0000
(18:45 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Wed, 28 Apr 2010 01:45:10 +0000
(18:45 -0700)
src/node.js
patch
|
blob
|
history
diff --git
a/src/node.js
b/src/node.js
index
1ebed97
..
e6875d8
100644
(file)
--- a/
src/node.js
+++ b/
src/node.js
@@
-139,6
+139,11
@@
process.__defineGetter__('stdout', function () {
stdout = new fs.FileWriteStream(null, {fd: fd});
} else {
stdout = new net.Stream(fd);
+ // FIXME Should probably have an option in net.Stream to create a stream from
+ // an existing fd which is writable only. But for now we'll just add
+ // this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stdout.readable = false;
}
return stdout;