more: exit if write to stdout errors out
No binary (build failed)
—
(log yok)
| @@ -191,6 +191,9 @@ int more_main(int argc UNUSED_PARAM, char **argv) | |
| } | |
| /* My small mind cannot fathom backspaces and UTF-8 */ | |
| putchar(c); | |
| + | |
| + | if (ferror(stdout)) /* if tty was destroyed (closed xterm, etc) */ |
| + | goto end; |
| } | |
| fclose(file); | |
| fflush_all(); | |