Project

General

Profile

Actions

Bug #1287

closed

$? not set after Open3::popen3

Added by phasis68 (Heesob Park) almost 16 years ago. Updated over 3 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
Backport:
[ruby-core:22887]

Description

=begin
$? is not set after popen3 in 1.9.1

Try following code:

require 'open3'
status = Open3::popen3("echo hello") do |stdin,stdout,stderr|
stdout.each { |line| puts "stdout:"+line }
end
p $?

[sidns@ns ~]$ ruby -v po.rb
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]
stdout:hello
#<Process::Status: pid=20140,exited(0)>

[siweb@localhost ~]$ ruby -v po.rb
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
stdout:hello
nil
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0