src/trio/_subprocess_platform/windows.py
raw| 1 | from typing import TYPE_CHECKING |
| 2 | |
| 3 | from .._wait_for_object import WaitForSingleObject |
| 4 | |
| 5 | if TYPE_CHECKING: |
| 6 | from .. import _subprocess |
| 7 | |
| 8 | |
| 9 | async def wait_child_exiting(process: "_subprocess.Process") -> None: |
| 10 | # _handle is not in Popen stubs, though it is present on Windows. |
| 11 | await WaitForSingleObject(int(process._proc._handle)) # type: ignore[attr-defined] |