mirror of
				https://github.com/python/cpython.git
				synced 2025-10-25 18:54:53 +00:00 
			
		
		
		
	Close subprocess pipes in _kill. Fixes a number of ResourceWarnings.
This commit is contained in:
		
							parent
							
								
									cbad4df179
								
							
						
					
					
						commit
						43ec577e2c
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -1006,6 +1006,9 @@ def _kill(self, sig): | |||
|                                 stdout=subprocess.PIPE, | ||||
|                                 stderr=subprocess.PIPE, | ||||
|                                 stdin=subprocess.PIPE) | ||||
|         self.addCleanup(proc.stdout.close) | ||||
|         self.addCleanup(proc.stderr.close) | ||||
|         self.addCleanup(proc.stdin.close) | ||||
| 
 | ||||
|         count, max = 0, 100 | ||||
|         while count < max and proc.poll() is None: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brian Curtin
						Brian Curtin