Skip to content

Commit adb444e

Browse files
committed
Timeout: use math.ceil to avoid truncation
1 parent fe05acc commit adb444e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,7 @@ def _wait_pidfd(self, timeout):
20802080
try:
20812081
poller = select.poll()
20822082
poller.register(pidfd, select.POLLIN)
2083-
events = poller.poll(int(timeout * 1000))
2083+
events = poller.poll(math.ceil(timeout * 1000))
20842084
if not events:
20852085
raise TimeoutExpired(self.args, timeout)
20862086
return True

0 commit comments

Comments
 (0)