Skip to content

Commit dea2d00

Browse files
authored
Fix hang and zombie process on interrupt (CTRL-C). (#3057)
1 parent 55c143f commit dea2d00

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/changelog/3056.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix hang and zombie process on interrupt (CTRL-C).

src/tox/execute/local_sub_process/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def __init__(self, options: ExecuteOptions, out: SyncWrite, err: SyncWrite, proc
6363

6464
@property
6565
def exit_code(self) -> int | None:
66+
# need to poll here, to make sure the returncode we get is current
67+
self._process.poll()
6668
return self._process.returncode
6769

6870
def interrupt(self) -> None:

0 commit comments

Comments
 (0)