mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 10:26:02 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			6 lines
		
	
	
	
		
			372 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
	
		
			372 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import signal, subprocess, sys
 | |
| # On Linux this causes os.waitpid to fail with OSError as the OS has already
 | |
| # reaped our child process.  The wait() passing the OSError on to the caller
 | |
| # and causing us to exit with an error is what we are testing against.
 | |
| signal.signal(signal.SIGCHLD, signal.SIG_IGN)
 | |
| subprocess.Popen([sys.executable, '-c', 'print("albatross")']).wait()
 | 
