mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-35727: Use exit code 0 on sys.exit() in multiprocessing.Process. (GH-11538)
This commit is contained in:
		
							parent
							
								
									baf29b2216
								
							
						
					
					
						commit
						c2ac4cf040
					
				
					 4 changed files with 22 additions and 11 deletions
				
			
		|  | @ -317,12 +317,12 @@ def _bootstrap(self, parent_sentinel=None): | |||
|             finally: | ||||
|                 util._exit_function() | ||||
|         except SystemExit as e: | ||||
|             if not e.args: | ||||
|                 exitcode = 1 | ||||
|             elif isinstance(e.args[0], int): | ||||
|                 exitcode = e.args[0] | ||||
|             if e.code is None: | ||||
|                 exitcode = 0 | ||||
|             elif isinstance(e.code, int): | ||||
|                 exitcode = e.code | ||||
|             else: | ||||
|                 sys.stderr.write(str(e.args[0]) + '\n') | ||||
|                 sys.stderr.write(str(e.code) + '\n') | ||||
|                 exitcode = 1 | ||||
|         except: | ||||
|             exitcode = 1 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Christopher Hunt
						Christopher Hunt