From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id 92B0695DC for ; Sat, 13 Feb 2016 22:38:52 +0100 (CET) Received: from mvs-01.mhcomputing.net (99-34-229-174.lightspeed.sntcca.sbcglobal.net [99.34.229.174]) by mail.mhcomputing.net (Postfix) with ESMTPSA id AB2D2EFD; Sat, 13 Feb 2016 13:38:51 -0800 (PST) From: Matthew Hall To: dev@dpdk.org Date: Sat, 13 Feb 2016 13:38:44 -0800 Message-Id: <1455399524-3252-3-git-send-email-mhall@mhcomputing.net> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455399524-3252-1-git-send-email-mhall@mhcomputing.net> References: <1455399524-3252-1-git-send-email-mhall@mhcomputing.net> Subject: [dpdk-dev] [PATCH 3/3] rte_epoll_wait: allow EINTR to be passed to caller X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 21:38:52 -0000 Otherwise the caller will not be able to handle a return from a signal handler. Signed-off-by: Matthew Hall --- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index c999cb6..4806ed1 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -1047,8 +1047,10 @@ rte_epoll_wait(int epfd, struct rte_epoll_event *events, rc = eal_epoll_process_event(evs, rc, events); break; } else if (rc < 0) { - if (errno == EINTR) - continue; + if (errno == EINTR) { + /* timeout early (such as thread shutdown) */ + break; + } /* epoll_wait fail */ RTE_LOG(ERR, EAL, "epoll_wait returns with fail %s\n", strerror(errno)); -- 2.5.0