mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #13841: Make child processes exit using sys.exit() on Windows
This commit is contained in:
parent
bc07cb883e
commit
73d9a292ae
6 changed files with 54 additions and 55 deletions
|
@ -13,7 +13,7 @@ import signal
|
|||
|
||||
from multiprocessing import util, process
|
||||
|
||||
__all__ = ['Popen', 'assert_spawning', 'exit', 'duplicate', 'close', 'ForkingPickler']
|
||||
__all__ = ['Popen', 'assert_spawning', 'duplicate', 'close', 'ForkingPickler']
|
||||
|
||||
#
|
||||
# Check that the current thread is spawning a child process
|
||||
|
@ -75,7 +75,6 @@ else:
|
|||
#
|
||||
|
||||
if sys.platform != 'win32':
|
||||
exit = os._exit
|
||||
duplicate = os.dup
|
||||
close = os.close
|
||||
|
||||
|
@ -168,7 +167,6 @@ else:
|
|||
WINEXE = (sys.platform == 'win32' and getattr(sys, 'frozen', False))
|
||||
WINSERVICE = sys.executable.lower().endswith("pythonservice.exe")
|
||||
|
||||
exit = _winapi.ExitProcess
|
||||
close = _winapi.CloseHandle
|
||||
|
||||
#
|
||||
|
@ -349,7 +347,7 @@ else:
|
|||
from_parent.close()
|
||||
|
||||
exitcode = self._bootstrap()
|
||||
exit(exitcode)
|
||||
sys.exit(exitcode)
|
||||
|
||||
|
||||
def get_preparation_data(name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue