Open3.popen3 doesn't return a thread object in jruby 1.7.0-rc1 #332

DrTom opened this Issue Oct 3, 2012 · 9 comments


None yet

7 participants

DrTom commented Oct 3, 2012

in MRI 1.9.3-194 the fourth and last object is a Thread as specified:

=> [#<IO:fd 6>, #<IO:fd 7>, #<IO:fd 9>, #<Thread:0x007f9b3383c9c8 sleep>]

in JRuby only three IO Objects are returned

=> [#<IO:fd 8>, #<IO:fd 7>, #<IO:fd 9>]

The same is true for the block variant of popen3.

My environment:

java -version
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

$env | grep JRU

$env | grep JAVA


Is there any progress on this? streamio-ffmpeg isn't working because of this bug. Thanks for your help!

DrTom commented Mar 19, 2013

C.Nutter reports a fix for 1.7.1:

However, I just performed a quick test: 1.7.1 and 1.7.2 will not return the thread object.
The problem persists.

styx commented Mar 20, 2013

Same here with jruby-head


same here

@alepulver alepulver referenced this issue in grosser/parallel_tests May 4, 2013

Initial JRuby support #208


This just bit me in the ass today:

stdin, stdout, stderr, pid = Open3.popen3("xclip -o -selection clipboard")
# => [#<IO:0x1e271de>, #<IO:0x1a1ccbd>, #<IO:0x188cdc1>]
@headius headius was assigned Sep 7, 2013

Fixed on master:

irb(main):003:0> stdin, stdout, stderr, thread = Open3.popen3("sleep 5")
=> [#<IO:fd 158>, #<IO:fd 157>, #<IO:fd 159>, #<Process::WaitThread:0x13cd159 run>]
irb(main):004:0> RUBY_DESCRIPTION
=> "jruby (1.9.3p392) 2013-09-06 294934d on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64]"
@BanzaiMan BanzaiMan closed this Sep 7, 2013

Eh. I spoke too soon.

@BanzaiMan BanzaiMan reopened this Sep 7, 2013

Heh. No, I didn't. It's the right return value.

@BanzaiMan BanzaiMan closed this Sep 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment