afb-client-demo: Fix bug that forbids interactive behaviour 05/15005/1
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 4 Jul 2018 12:59:58 +0000 (14:59 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Wed, 4 Jul 2018 14:56:12 +0000 (16:56 +0200)
Latest change that added script compatibility
(see 1f9e60c) introduced a regression that made
afb-client-demo not useable interactively.

Bug-AGL: SPEC-1562

Change-Id: I1e0ca5caa23ee9838ba8691f384db3d0b13bd488
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/main-afb-client-demo.c

index 3da7e46..bd0bbc4 100644 (file)
@@ -371,6 +371,8 @@ static int process_stdin()
                        break;
        }
        if (rc < 0) {
+               if (errno == EAGAIN)
+                       return 0;
                fprintf(stderr, "read error: %m\n");
                exit(1);
        }