From e2b258f3bb77dfd4c16b5f0a7a3e0b3d5d7e79e3 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sat, 9 Jun 2007 22:37:03 +0200 Subject: [PATCH] Fix in WAIT-UNTIL-FD-READY: on EINTR the timeout is recalculated before calling again poll(). Signed-off-by: Stelian Ionescu --- io-multiplex/common.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/io-multiplex/common.lisp b/io-multiplex/common.lisp index 8a605f7..d81fd29 100644 --- a/io-multiplex/common.lisp +++ b/io-multiplex/common.lisp @@ -472,8 +472,9 @@ (setf et:fd fd et:events (choose-poll-flags event-type)) (handler-case - (let ((ret (et:repeat-upon-eintr - (et:poll pollfd 1 (timeout->milisec timeout))))) + (let ((ret (et:repeat-upon-condition-decreasing-timeout + ((et:eintr) tmp-timeout (timeout->milisec timeout)) + (et:poll pollfd 1 tmp-timeout)))) (when (zerop ret) (return-from wait-until-fd-ready '(:timeout)))) (et:unix-error () -- 2.11.4.GIT