Skip to content

Commit 4da3f95

Browse files
committed
Fix proc._is_aliva_impl
1 parent 5eefcfe commit 4da3f95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ptrlib/connection/proc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ def _close_impl(self):
250250

251251
def _is_alive_impl(self) -> bool:
252252
"""Check if the process is alive"""
253-
return self.poll() is None
253+
ready, [], [] = select.select([self._proc.stdout.fileno()], [], [], 0)
254+
return len(ready) != 0 or self.poll() is None
254255

255256
def __str__(self) -> str:
256257
return f"'{self._filepath}' (PID={self._proc.pid})"

0 commit comments

Comments
 (0)