You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execution Result:
D:\ruby\jruby-1.7.18\bin\jruby.exe --1.9 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/ruby/projects/test1/test/test1.rb
IOError: Cannot run program "date" (in directory "D:\ruby\projects\test1\test"): CreateProcess error=2, ?????????
popen at org/jruby/RubyIO.java:4345
(root) at D:/ruby/projects/test1/test/test1.rb:1
load at org/jruby/RubyKernel.java:1087
(root) at -e:1
The text was updated successfully, but these errors were encountered:
Ok, so it turns out we had the right logic for non-popen spawns (system, backticks) and I was able to add it to popen. It's probably not the cleanest fix but it appears to work right.
It is not clear whether popen should automatically choose sh when
under *nix, and this causes test_pid in MRI test_io to fail with
an off-by-one pid (because the sh process and the target command
are different pids).
dateProc = IO.popen("date", 'w+')
dateProc.puts "\n"
dateProc.close_write
s2 = dateProc.gets
puts s2
Execution Result:
D:\ruby\jruby-1.7.18\bin\jruby.exe --1.9 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/ruby/projects/test1/test/test1.rb
IOError: Cannot run program "date" (in directory "D:\ruby\projects\test1\test"): CreateProcess error=2, ?????????
popen at org/jruby/RubyIO.java:4345
(root) at D:/ruby/projects/test1/test/test1.rb:1
load at org/jruby/RubyKernel.java:1087
(root) at -e:1
The text was updated successfully, but these errors were encountered: