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

Method configure_subprocess

Lib/test/libregrtest/runtests.py:31–41  ·  view source on GitHub ↗
(self, popen_kwargs: dict[str, Any])

Source from the content-addressed store, hash-verified

29 file_type: str
30
31 def configure_subprocess(self, popen_kwargs: dict[str, Any]) -> None:
32 match self.file_type:
33 case JsonFileType.UNIX_FD:
34 # Unix file descriptor
35 popen_kwargs['pass_fds'] = [self.file]
36 case JsonFileType.WINDOWS_HANDLE:
37 # Windows handle
38 # We run mypy with `--platform=linux` so it complains about this:
39 startupinfo = subprocess.STARTUPINFO() # type: ignore[attr-defined]
40 startupinfo.lpAttributeList = {"handle_list": [self.file]}
41 popen_kwargs['startupinfo'] = startupinfo
42
43 @contextlib.contextmanager
44 def inherit_subprocess(self) -> Iterator[None]:

Callers 1

create_worker_processFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected