Skip to content
Snippets Groups Projects
Commit 61d17588 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

feh_event_handle_stdin: handle EOF

Closes #595
parent a1a47cf1
No related branches found
No related tags found
Loading
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment