1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00

Make stdout line buffered.

# syslogc -f foobuf | grep bar
is now usable.
OK mikeb, djm, markus
This commit is contained in:
mpf 2011-07-04 20:23:09 +00:00
parent ce569beb17
commit 6091609007

View File

@ -1,4 +1,4 @@
/* $OpenBSD: syslogc.c,v 1.14 2008/09/10 22:17:33 sobrado Exp $ */
/* $OpenBSD: syslogc.c,v 1.15 2011/07/04 20:23:09 mpf Exp $ */
/*
* Copyright (c) 2004 Damien Miller
@ -145,6 +145,7 @@ main(int argc, char **argv)
fflush(ctlf);
setlinebuf(ctlf);
setlinebuf(stdout);
/* Fetch header */
if (fread(&rr, sizeof(rr), 1, ctlf) != 1)