Commit 61d17588 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

feh_event_handle_stdin: handle EOF

Closes #595
parent a1a47cf1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");