mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #28053: Applying refactorings, docs and other cleanup to follow.
This commit is contained in:
parent
f1024f7425
commit
5458647bb8
13 changed files with 77 additions and 40 deletions
|
@ -4,9 +4,8 @@ import signal
|
|||
import sys
|
||||
import _winapi
|
||||
|
||||
from . import context
|
||||
from .context import reduction, get_spawning_popen, set_spawning_popen
|
||||
from . import spawn
|
||||
from . import reduction
|
||||
from . import util
|
||||
|
||||
__all__ = ['Popen']
|
||||
|
@ -60,15 +59,15 @@ class Popen(object):
|
|||
util.Finalize(self, _winapi.CloseHandle, (self.sentinel,))
|
||||
|
||||
# send information to child
|
||||
context.set_spawning_popen(self)
|
||||
set_spawning_popen(self)
|
||||
try:
|
||||
reduction.dump(prep_data, to_child)
|
||||
reduction.dump(process_obj, to_child)
|
||||
finally:
|
||||
context.set_spawning_popen(None)
|
||||
set_spawning_popen(None)
|
||||
|
||||
def duplicate_for_child(self, handle):
|
||||
assert self is context.get_spawning_popen()
|
||||
assert self is get_spawning_popen()
|
||||
return reduction.duplicate(handle, self.sentinel)
|
||||
|
||||
def wait(self, timeout=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue