Skip to content

Commit 87f391f

Browse files
committed
Return status code after timeout: usually this will be None, as we are
returning now, except if we raced with another thread that set it just after our timeout expired.
1 parent ad102f4 commit 87f391f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/multiprocessing/popen_forkserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def poll(self, flag=os.WNOHANG):
6565
from multiprocessing.connection import wait
6666
timeout = 0 if flag == os.WNOHANG else None
6767
if not wait([self.sentinel], timeout):
68-
return None
68+
return self.returncode
6969

7070
with self._lock:
7171
if self.returncode is None:

0 commit comments

Comments
 (0)