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:
mckusick 2009-10-30 21:54:53 +00:00
parent 514b7768c1
commit 1f53d34702

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;