Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
DrTom opened this Issue · 9 comments

7 participants

@DrTom

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

Open3.popen3("ls")
=> [#, #, #, #]

in JRuby only three IO Objects are returned

Open3.popen3("ls")
=> [#, #, #]

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
JRUBY_OPTS=--1.9

$env | grep JAVA
JAVA_OPTS=-client

@DimaSavitsky

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

@DrTom

C.Nutter reports a fix for 1.7.1: http://jira.codehaus.org/browse/JRUBY-6409

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

The problem persists.

@styx

Same here with jruby-head

@alepulver

same here

@alepulver alepulver referenced this issue in grosser/parallel_tests
Merged

Initial JRuby support #208

@envygeeks

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
@BanzaiMan
Owner

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.7.5.dev (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
@BanzaiMan
Owner

Eh. I spoke too soon.

@BanzaiMan BanzaiMan reopened this
@BanzaiMan
Owner

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

@BanzaiMan BanzaiMan closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.