about summary refs log tree commit diff
path: root/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'cache.c')
-rw-r--r--cache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cache.c b/cache.c
index 6736a01..2ccdc4e 100644
--- a/cache.c
+++ b/cache.c
@@ -224,6 +224,12 @@ static int fill_slot(struct cache_slot *slot)
 	/* Generate cache content */
 	slot->fn();
 
+	/* Make sure any buffered data is flushed to the file */
+	if (fflush(stdout)) {
+		close(tmp);
+		return errno;
+	}
+
 	/* update stat info */
 	if (fstat(slot->lock_fd, &slot->cache_st)) {
 		close(tmp);
llow=1'>Highlight yacc and lex files as CJune McEnroe Their %-prefixed directives should probably be highlighted Macro. 2019-05-10Use val instead of suboptargJune McEnroe suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on failure? 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe Need to do some stuff in the Makefile for lex and yacc and generating HTML pages for it. 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe