diff options
Diffstat (limited to 'sample')
-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 |