mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									5b540799bf
								
							
						
					
					
						commit
						0d98fd889f
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue