Illegal seek error trying to read() from pipe
---------------------------------------------
Key: JRUBY-3071
URL: http://jira.codehaus.org/browse/JRUBY-3071
Project: JRuby
Issue Type: Bug
Environment: OS X
Reporter: PJ Hyett
Assignee: Thomas E Enebo
The following code works fine:
{code}
out, err = '', ''
Open3.popen3("ps aux") do |stdin, stdout, stderr|
while ou = stdout.read(1024)
out += ou
end
while er = stderr.read(1024)
err += er
end
end
{code}
The following code doesn't work (but works in Ruby):
{code}
out, err = '', ''
Open3.popen3("ps aux") do |stdin, stdout, stderr|
out = stdout.read
err = stderr.read
end
{code}
Tested against recent build of trunk (10/23)
--
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