From 170c8387cd33d459b04169782ef78ca2e73cb422 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 25 Sep 2017 20:22:03 +0200 Subject: [PATCH] simple: event-loop: fix EINTR handling We want to handle EINTR as a timeout event. Don't return here. Signed-off-by: Bartosz Golaszewski --- src/lib/simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/simple.c b/src/lib/simple.c index 12766e6..c2905c5 100644 --- a/src/lib/simple.c +++ b/src/lib/simple.c @@ -167,7 +167,7 @@ int gpiod_simple_event_loop(const char *consumer, const char *device, status = gpiod_line_event_wait(line, timeout); if (status < 0) { if (errno == EINTR) - return evtype = GPIOD_EVENT_CB_TIMEOUT; + evtype = GPIOD_EVENT_CB_TIMEOUT; else goto out; } else if (status == 0) { -- 2.30.2