From c8e88408b2bcfaba048f3056440a11a64da4a369 Mon Sep 17 00:00:00 2001 From: Max Kellermann <max.kellermann@ionos.com> Date: Tue, 4 Feb 2025 10:50:18 +0100 Subject: [PATCH] io/uring/Ring: ignore EINTR --- src/io/uring/Ring.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/uring/Ring.cxx b/src/io/uring/Ring.cxx index cd7c7721d..aac528365 100644 --- a/src/io/uring/Ring.cxx +++ b/src/io/uring/Ring.cxx @@ -51,7 +51,7 @@ Ring::WaitCompletion() struct io_uring_cqe *cqe; if (int error = io_uring_wait_cqe(&ring, &cqe); error < 0) { - if (error == -EAGAIN) + if (error == -EAGAIN || error == -EINTR) return nullptr; throw MakeErrno(-error, "io_uring_wait_cqe() failed"); @@ -66,7 +66,7 @@ Ring::SubmitAndWaitCompletion(struct __kernel_timespec &timeout) struct io_uring_cqe *cqe; if (int error = io_uring_submit_and_wait_timeout(&ring, &cqe, 1, &timeout, nullptr); error < 0) { - if (error == -ETIME || error == -EAGAIN) + if (error == -ETIME || error == -EAGAIN || error == -EINTR) return nullptr; throw MakeErrno(-error, "io_uring_submit_and_wait_timeout() failed"); @@ -80,7 +80,7 @@ Ring::PeekCompletion() { struct io_uring_cqe *cqe; if (int error = io_uring_peek_cqe(&ring, &cqe); error < 0) { - if (error == -EAGAIN) + if (error == -EAGAIN || error == -EINTR) return nullptr; throw MakeErrno(-error, "io_uring_peek_cqe() failed");