From: Bartosz Golaszewski Date: Mon, 25 Sep 2017 18:22:03 +0000 (+0200) Subject: simple: event-loop: fix EINTR handling X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=170c8387cd33d459b04169782ef78ca2e73cb422;p=qemu-gpiodev%2Flibgpiod.git simple: event-loop: fix EINTR handling We want to handle EINTR as a timeout event. Don't return here. Signed-off-by: Bartosz Golaszewski --- 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) {