ruby-changes:45458
From: nobu <ko1@a...>
Date: Sat, 4 Feb 2017 19:48:17 +0900 (JST)
Subject: [ruby-changes:45458] nobu:r57531 (trunk): pty/shl.rb: update [ci skip]
nobu 2017-02-04 19:48:13 +0900 (Sat, 04 Feb 2017) New Revision: 57531 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57531 Log: pty/shl.rb: update [ci skip] * sample/pty/shl.rb: stop writer loop when the child exited. PTY::ChildExited no longer raises asynchronously since r20298. [ruby-dev:49974] [Bug #13191] Modified files: trunk/sample/pty/shl.rb Index: sample/pty/shl.rb =================================================================== --- sample/pty/shl.rb (revision 57530) +++ sample/pty/shl.rb (revision 57531) @@ -41,9 +41,10 @@ end https://github.com/ruby/ruby/blob/trunk/sample/pty/shl.rb#L41 $reader = Thread.new { while true begin - next if $r_pty.nil? + Thread.stop unless $r_pty c = $r_pty.getc if c.nil? then + Thread.main.raise('Exit') Thread.stop end print c.chr -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/