Issue #14505 has been reported by lionel_perrin (Lionel PERRIN).

----------------------------------------
Bug #14505: IO.popen / Open3.popen2 / backtick subprocess remains blocked
https://bugs.ruby-lang.org/issues/14505

* Author: lionel_perrin (Lionel PERRIN)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
The following ruby code never returns
~~~ ruby
`ruby -r oci8 -e puts 'hello'`
# this never returns too: IO.popen(%w(ruby -r oci8 -e)+["puts 'hello'"]) { |o| puts o.read }
# and this is blocked too: Open3.capture2(*%w(ruby -r oci8 -e)+["puts 'hello'"])
~~~

while its python equivalent runs successfully
~~~ python
import subprocess
subprocess.call(['ruby', '-r', 'oci8', '-e', 'puts "hello"'])
~~~

The issue seems to require some 'unusual' context to be triggered. The ruby-oci8 (https://github.com/kubo/ruby-oci8) gem used by the subprocess  loads an oracle dll which seems to open some file descriptors. Anyway, I wouldn't expect the caller to be affected by the libraries loaded by the subprocesses.

Thanks for your help,

Lionel



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>