about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-05-05 21:15:36 +0200
committerLeah Neukirchen <leah@vuxu.org>2018-05-05 21:15:36 +0200
commit44fa475c6d9dcb4b2f2ba89f39f5e7227fb9eec7 (patch)
tree09eb77cdbf13c8d0c3a3847b146760cf15700351
parentfba7f29a7d5e649d91ac1edd09b70ee28b22743e (diff)
downloadsnooze-44fa475c6d9dcb4b2f2ba89f39f5e7227fb9eec7.tar.gz
snooze-44fa475c6d9dcb4b2f2ba89f39f5e7227fb9eec7.tar.xz
snooze-44fa475c6d9dcb4b2f2ba89f39f5e7227fb9eec7.zip
force stdout line-buffered, as output comes very slowly
Fixes #3.
-rw-r--r--snooze.c2
1 files changed, 2 insertions, 0 deletions
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;