summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/elput/elput_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index 1baf2f8dc8..bff5503692 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -40,8 +40,10 @@ _cb_open_restricted(const char *path, int flags, void *data)
40 avail = select(p[0] + 1, &rfds, &wfds, &exfds, t); 40 avail = select(p[0] + 1, &rfds, &wfds, &exfds, t);
41 if (avail > 0) 41 if (avail > 0)
42 { 42 {
43 read(p[0], &fd, sizeof(int)); 43 if (read(p[0], &fd, sizeof(int)) < 1)
44 ret = fd; 44 ret = -1;
45 else
46 ret = fd;
45 break; 47 break;
46 } 48 }
47 if (avail < 0) break; 49 if (avail < 0) break;