From 7486ea58c1469864e1c6f801019419b7281ade15 Mon Sep 17 00:00:00 2001 From: wujianlin Date: Wed, 20 Dec 2023 08:10:45 +0000 Subject: [PATCH] Clean up redundant printing Issue:https://gitee.com/openharmony/commonlibrary_c_utils/issues/I8Q009?from=project-issue Signed-off-by: wujianlin --- base/src/event_demultiplexer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/src/event_demultiplexer.cpp b/base/src/event_demultiplexer.cpp index 9e1633b..ae5b254 100644 --- a/base/src/event_demultiplexer.cpp +++ b/base/src/event_demultiplexer.cpp @@ -31,6 +31,7 @@ namespace Utils { static const int EPOLL_MAX_EVENS_INIT = 8; static const int HALF_OF_MAX_EVENT = 2; static const int EPOLL_INVALID_FD = -1; +static const int INTERRUPTED_SYS_CALL = 4; EventDemultiplexer::EventDemultiplexer() : epollFd_(epoll_create1(EPOLL_CLOEXEC)), maxEvents_(EPOLL_MAX_EVENS_INIT), mutex_(), eventHandlers_() @@ -111,7 +112,9 @@ void EventDemultiplexer::Polling(int timeout /* ms */) return; } if (nfds == -1) { - UTILS_LOGE("epoll_wait failed, errno %{public}d", errno); + if (errno != INTERRUPTED_SYS_CALL) { + UTILS_LOGE("epoll_wait failed, errno %{public}d", errno); + } return; } -- Gitee