MCPcopy Index your code
hub / github.com/python/cpython / inherit_subprocess

Method inherit_subprocess

Lib/test/libregrtest/runtests.py:44–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42
43 @contextlib.contextmanager
44 def inherit_subprocess(self) -> Iterator[None]:
45 if sys.platform == 'win32' and self.file_type == JsonFileType.WINDOWS_HANDLE:
46 os.set_handle_inheritable(self.file, True)
47 try:
48 yield
49 finally:
50 os.set_handle_inheritable(self.file, False)
51 else:
52 yield
53
54 def open(self, mode='r', *, encoding):
55 if self.file_type == JsonFileType.STDOUT:

Callers 1

create_worker_processFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected