summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/keyevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index a5526a2..0ca489a 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -319,7 +319,7 @@ void feh_event_handle_stdin()
char stdin_buf[2];
static char is_esc = 0;
KeySym keysym = NoSymbol;
- if (read(STDIN_FILENO, &stdin_buf, 1) == -1) {
+ if (read(STDIN_FILENO, &stdin_buf, 1) <= 0) {
control_via_stdin = 0;
if (isatty(STDIN_FILENO) && getpgrp() == (tcgetpgrp(STDIN_FILENO))) {
weprintf("reading a command from stdin failed - disabling control via stdin");