-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Redirecting stderr to stdout in spawn gives an exception.
$ jirb
irb(main):001:0> Process.spawn('ls -al',:err => :out)
Java::JavaLang::ArrayIndexOutOfBoundsException: -2
from org.jruby.util.io.PopenExecutor.run_exec_dup2(PopenExecutor.java:789)
from org.jruby.util.io.PopenExecutor.execargRunOptions(PopenExecutor.java:986)
from org.jruby.util.io.PopenExecutor.spawnProcess(PopenExecutor.java:113)
from org.jruby.util.io.PopenExecutor.spawn(PopenExecutor.java:75)
from org.jruby.RubyProcess.spawn(RubyProcess.java:1296)
from
Same thing happens if you use STDERR => STDOUT or 2 => 1 (instead of :err => :out) as shown in http://ruby-doc.org/core-2.2.2/Process.html#method-c-spawn
This was run on:
$ jruby -v
jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa OpenJDK 64-Bit Server VM 24.91-b01 on 1.7.0_91-b02 +jit [linux-amd64]
Reactions are currently unavailable