Skip to content

Commit 527646d

Browse files
committed
Use ceil(timeout) to avoid truncation
1 parent 61c6b99 commit 527646d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/subprocess.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import threading
5252
import warnings
5353
import contextlib
54-
import functools
5554
import math
5655
from time import monotonic as _time
5756
import types
@@ -2079,7 +2078,7 @@ def _wait_pidfd(self, timeout):
20792078
try:
20802079
poller = select.poll()
20812080
poller.register(pidfd, select.POLLIN)
2082-
events = poller.poll(int(timeout * 1000))
2081+
events = poller.poll(math.ceil(timeout * 1000))
20832082
if not events:
20842083
raise TimeoutExpired(self.args, timeout)
20852084
return True

0 commit comments

Comments
 (0)