From: Ryan Dahl Date: Wed, 28 Apr 2010 01:45:10 +0000 (-0700) Subject: stdout should be writable only X-Git-Tag: v0.1.93~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5aea12b4c4e14b7add179a9943487a3f766ccaf8;p=platform%2Fupstream%2Fnodejs.git stdout should be writable only --- diff --git a/src/node.js b/src/node.js index 1ebed97..e6875d8 100644 --- 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;