Project

General

Profile

Bug #3673

PTY.getpty with IO.pipe doesn't finish on FreeBSD

Added by naruse (Yui NARUSE) almost 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.3dev (2010-08-09 trunk 28938) [x86_64-freebsd8.1]
Backport:
[ruby-dev:41966]

Description

=begin
以下のプログラムが FreeBSD で終了しません。
(test/ruby/test_rubyoptions.rb の test_script_from_stdin より)
Ubuntu 8.04 や Mac OS X 10.6 では終わることを確認しています。

require 'pty'
#require 'timeout'
s, w = IO.pipe
PTY.getpty('./ruby', out: w) do |r, m|
w.close
#m.print("print 'abc'\n")
m.print("\C-d")
p s.read
# result = Timeout.timeout(3) {s.read}
end
puts :fin
=end

Also available in: Atom PDF