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.
This commit is contained in:
Kirk McKusick 2009-10-30 21:54:53 +00:00
parent 6aca3a5d0b
commit 4145bb53bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198702

View File

@ -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;