On Tue, Jan 15, 2013 at 08:59:28PM +0100, Lennart Poettering wrote: > On Sun, 13.01.13 12:28, David Herrmann ([email protected]) wrote: > > > This makes journalctl quit on ferror() conditions on stdout. It fixes an > > annoying bug if you pipe its output through 'less' and press 'q'. Without > > this fix journalctl will continue reading all journal data until EOF which > > can take quite some time. For instance on my machine: > > Applied! Thanks! > > +++ b/src/journal/journalctl.c > > @@ -1077,7 +1077,7 @@ int main(int argc, char *argv[]) { > > arg_catalog * OUTPUT_CATALOG; > > > > r = output_journal(stdout, j, arg_output, 0, > > flags); > > - if (r < 0) > > + if (r < 0 || ferror(stdout)) > > goto finish; > > > > need_seek = true; Hm, is this the proper place to check for errors? Shouldn't the journal output functions check for errors instead?
Zbyszek _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
