Gaps in STDIN pipe stream if backtick is used
---------------------------------------------
Key: JRUBY-4626
URL: http://jira.codehaus.org/browse/JRUBY-4626
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4
Environment: Mac OSX, Ubuntu Karmic
Reporter: Greg Fodor
Attachments: stdin_bug.tar.gz
If you use a backtick operator, any data going through STDIN ends up going to
that process during the time it is executing. Attached find an example that if
you run it via:
cat test_file.txt | jruby test.rb
You will see "nil" whereas
cat test_file.txt | ruby test.rb
You will see "hello"
The reason for this is because of the presence of a `ls` on the first line of
the script. Apparently STDIN gets corrupted due to this backtick.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email