mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Stop making fork server have copy of semaphore_tracker_fd.
This commit is contained in:
parent
0718f70131
commit
7d2d43c0b1
5 changed files with 29 additions and 24 deletions
|
@ -32,13 +32,14 @@ class Popen(object):
|
|||
|
||||
def __init__(self, process_obj):
|
||||
prep_data = spawn.get_preparation_data(process_obj._name)
|
||||
cmd = ' '.join('"%s"' % x for x in spawn.get_command_line())
|
||||
|
||||
# read end of pipe will be "stolen" by the child process
|
||||
# -- see spawn_main() in spawn.py.
|
||||
rhandle, whandle = _winapi.CreatePipe(None, 0)
|
||||
wfd = msvcrt.open_osfhandle(whandle, 0)
|
||||
cmd += ' {} {}'.format(os.getpid(), rhandle)
|
||||
cmd = spawn.get_command_line(parent_pid=os.getpid(),
|
||||
pipe_handle=rhandle)
|
||||
cmd = ' '.join('"%s"' % x for x in cmd)
|
||||
|
||||
with open(wfd, 'wb', closefd=True) as to_child:
|
||||
# start process
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue