mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Fix a unittest error seen on NetBSD 5.
This commit is contained in:
		
						commit
						0648458b84
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1370,8 +1370,18 @@ def test_pipe_cloexec_real_tools(self):
 | 
			
		|||
 | 
			
		||||
        self.addCleanup(p1.wait)
 | 
			
		||||
        self.addCleanup(p2.wait)
 | 
			
		||||
        self.addCleanup(p1.terminate)
 | 
			
		||||
        self.addCleanup(p2.terminate)
 | 
			
		||||
        def kill_p1():
 | 
			
		||||
            try:
 | 
			
		||||
                p1.terminate()
 | 
			
		||||
            except ProcessLookupError:
 | 
			
		||||
                pass
 | 
			
		||||
        def kill_p2():
 | 
			
		||||
            try:
 | 
			
		||||
                p2.terminate()
 | 
			
		||||
            except ProcessLookupError:
 | 
			
		||||
                pass
 | 
			
		||||
        self.addCleanup(kill_p1)
 | 
			
		||||
        self.addCleanup(kill_p2)
 | 
			
		||||
 | 
			
		||||
        p1.stdin.write(data)
 | 
			
		||||
        p1.stdin.close()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue