diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-04 10:48:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-04 10:48:13 +0000 |
commit | 0d98fd889f7c0b7a503071a4e905230a32dbe5a4 (patch) | |
tree | 2890d90abc1a6590a56012415cad7870c2c75deb /sample/pty | |
parent | 5b540799bf1ae14163114b42f14fbf3cf655d4cb (diff) | |
download | ruby-0d98fd889f7c0b7a503071a4e905230a32dbe5a4.tar.gz |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/pty')
-rw-r--r-- | sample/pty/shl.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/pty/shl.rb b/sample/pty/shl.rb index d82553dd89..1a878ac8aa 100644 --- a/sample/pty/shl.rb +++ b/sample/pty/shl.rb @@ -41,9 +41,10 @@ end $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 |