svn commit: r198702 - head/usr.bin/logger
Kirk McKusick
mckusick at FreeBSD.org
Fri Oct 30 21:54:54 UTC 2009
Author: mckusick
Date: Fri Oct 30 21:54:53 2009
New Revision: 198702
URL: http://svn.freebsd.org/changeset/base/198702
Log:
When reading input from a file or device (via -f option) set the
input to be in non-buffering mode so that input lines are logged
as they occur rather than being saved up until a buffer's worth of
input has been logged.
Modified:
head/usr.bin/logger/logger.c
Modified: head/usr.bin/logger/logger.c
==============================================================================
--- head/usr.bin/logger/logger.c Fri Oct 30 21:00:58 2009 (r198701)
+++ head/usr.bin/logger/logger.c Fri Oct 30 21:54:53 2009 (r198702)
@@ -114,6 +114,7 @@ main(int argc, char *argv[])
case 'f': /* file to log */
if (freopen(optarg, "r", stdin) == NULL)
err(1, "%s", optarg);
+ setvbuf(stdin, 0, _IONBF, 0);
break;
case 'h': /* hostname to deliver to */
host = optarg;
More information about the svn-src-head
mailing list