]> git.netwichtig.de Git - user/henk/code/snooze.git/commitdiff
force stdout line-buffered, as output comes very slowly
authorLeah Neukirchen <leah@vuxu.org>
Sat, 5 May 2018 19:15:36 +0000 (21:15 +0200)
committerLeah Neukirchen <leah@vuxu.org>
Sat, 5 May 2018 19:15:36 +0000 (21:15 +0200)
Fixes #3.

snooze.c

index 1dda3ebbc04e90f794b14226e46f0d72bfcddd9a..8bbd93fb366b35437a7fa0aef6cf0610e725074b 100644 (file)
--- 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;