Project

General

Profile

Actions

Bug #3673

closed

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

Added by naruse (Yui NARUSE) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0