diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 5d9ec4df83b..90271052fdb 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -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;