← Commit list

0b90de153

Denys Vlasenko
Denys Vlasenko
2010-12-13
FAILED Duration: 220s

Subject

more: exit if write to stdout errors out

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/more.c+3 -0
@@ -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();