Since ts(1) is line-based, always using line buffering
authorjob <job@openbsd.org>
Wed, 3 Aug 2022 16:54:30 +0000 (16:54 +0000)
committerjob <job@openbsd.org>
Wed, 3 Aug 2022 16:54:30 +0000 (16:54 +0000)
makes sense millert@
yep deraadt@

usr.bin/ts/ts.c

index ccfe21f..284d8cc 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ts.c,v 1.8 2022/07/07 10:40:25 claudio Exp $  */
+/*     $OpenBSD: ts.c,v 1.9 2022/08/03 16:54:30 job Exp $      */
 /*
  * Copyright (c) 2022 Job Snijders <job@openbsd.org>
  * Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org>
@@ -72,6 +72,8 @@ main(int argc, char *argv[])
        argc -= optind;
        argv += optind;
 
+       setvbuf(stdout, NULL, _IOLBF, 0);
+
        if ((iflag && sflag) || argc > 1)
                usage();