summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-07-04 14:59:58 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-04 16:56:12 +0200
commit26286eb5a7af0b58ec602afda45eb021cc21d104 (patch)
tree95e590a815f00a5a5f700f6259e3dfb554ca793f
parenteb0abe2509bdcd923f12f471e7af4aa7f87909e1 (diff)
afb-client-demo: Fix bug that forbids interactive behaviour
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>
-rw-r--r--src/main-afb-client-demo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main-afb-client-demo.c b/src/main-afb-client-demo.c
index 3da7e46e..bd0bbc40 100644
--- a/src/main-afb-client-demo.c
+++ b/src/main-afb-client-demo.c
@@ -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);
}