diff options
author | mpf <mpf@openbsd.org> | 2011-07-04 20:23:09 +0000 |
---|---|---|
committer | mpf <mpf@openbsd.org> | 2011-07-04 20:23:09 +0000 |
commit | 60916090075b6206b27a774b35924daf7520e2ab (patch) | |
tree | 03e85c4037737681cf25a8c9be6466f15ce73fa3 /usr.sbin/syslogc | |
parent | fix incorrect use of NULL, from 1.45 of upstream (diff) | |
download | wireguard-openbsd-60916090075b6206b27a774b35924daf7520e2ab.tar.xz wireguard-openbsd-60916090075b6206b27a774b35924daf7520e2ab.zip |
Make stdout line buffered.
# syslogc -f foobuf | grep bar
is now usable.
OK mikeb, djm, markus
Diffstat (limited to 'usr.sbin/syslogc')
-rw-r--r-- | usr.sbin/syslogc/syslogc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/syslogc/syslogc.c b/usr.sbin/syslogc/syslogc.c index 1b3de71a2ad..a6a30b46c91 100644 --- a/usr.sbin/syslogc/syslogc.c +++ b/usr.sbin/syslogc/syslogc.c @@ -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) |