Project

General

Profile

Actions

Bug #694

closed

eof? call on a pty IO object causes application to exit

Added by pragdave (Dave Thomas) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:19583]

Description

=begin
dave[RUBY3/Book 18:08:15*] cat t.rb

require 'pty'

PTY.spawn("/usr/bin/ruby /usr/bin/irb") do |reader, writer, pid|
reader.eof?
end

dave[RUBY3/Book 18:08:52*] ruby -v t.rb

ruby 1.9.0 (2008-10-29 revision 15427) [i386-darwin9.5.0]
t.rb:4:in eof?': pty - exited: 82527 (PTY::ChildExited) from t.rb:4:in block in '
from t.rb:3:in spawn' from t.rb:3:in '

This problem prevents expect() from working.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0