From 44fa475c6d9dcb4b2f2ba89f39f5e7227fb9eec7 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 5 May 2018 21:15:36 +0200 Subject: force stdout line-buffered, as output comes very slowly Fixes #3. --- snooze.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snooze.c b/snooze.c index 1dda3eb..8bbd93f 100644 --- a/snooze.c +++ b/snooze.c @@ -244,6 +244,8 @@ main(int argc, char *argv[]) minute[0] = '*'; second[0] = '*'; + setvbuf(stdout, 0, _IOLBF, 0); + while ((c = getopt(argc, argv, "+D:W:H:M:S:T:R:d:m:ns:t:vw:")) != -1) switch (c) { case 'D': parse(optarg, dayofyear, sizeof dayofyear, -1); break; -- cgit 1.4.1