mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	ssh: Flush writing end of pipes before closing
When running a background command, ensure the redirection thread flushes the writing end of the pipe before closing it.
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							9c8624833e
						
					
				
				
					commit
					a6dd4ddbce
				
			@@ -678,6 +678,7 @@ class SshConnection(SshConnectionBase):
 | 
				
			|||||||
            # Make sure the writing end are closed proper since we are not
 | 
					            # Make sure the writing end are closed proper since we are not
 | 
				
			||||||
            # going to write anything anymore
 | 
					            # going to write anything anymore
 | 
				
			||||||
            for r, w in out_streams.values():
 | 
					            for r, w in out_streams.values():
 | 
				
			||||||
 | 
					                w.flush()
 | 
				
			||||||
                if r is not w and w is not None:
 | 
					                if r is not w and w is not None:
 | 
				
			||||||
                    w.close()
 | 
					                    w.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user