From 63462fd8ab1bf2638de7bb3a699bc35f0016d780 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 25 Aug 2022 10:21:59 +0200 Subject: [PATCH] vmm: serial_manager: Iterate again on EINTR If the epoll_wait() call returns EINTR, this only means a signal has been delivered before any of the file descriptors registered triggered an event or before the end of the timeout (if timeout isn't -1). For that reason, we should simply try to listen on the epoll loop again. Signed-off-by: Sebastien Boeuf --- vmm/src/serial_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/serial_manager.rs b/vmm/src/serial_manager.rs index 9d31d98f3..d694c2eab 100644 --- a/vmm/src/serial_manager.rs +++ b/vmm/src/serial_manager.rs @@ -239,7 +239,7 @@ impl SerialManager { // returns an error of type EINTR, but this should not // be considered as a regular error. Instead it is more // appropriate to retry, by calling into epoll_wait(). - 0 + continue; } else { return Err(Error::Epoll(e)); }