aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2025-11-03 10:16:45 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2025-11-03 10:16:45 -0500
commit943158fb06aaab2b1da644199652f3cf4e83ec92 (patch)
tree54ca621d517a53d38ec56fac724a32ccae83d9ef
parentda767360027270223ab58e7b376ba4affd2648b2 (diff)
downloadstasis-943158fb06aaab2b1da644199652f3cf4e83ec92.tar.gz
Flush buffers
-rw-r--r--src/lib/core/multiprocessing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c
index 597f0e3..d092915 100644
--- a/src/lib/core/multiprocessing.c
+++ b/src/lib/core/multiprocessing.c
@@ -90,6 +90,8 @@ static int mp_task_fork(struct MultiProcessingPool *pool, struct MultiProcessing
child(pool, task);
} else {
parent_status = parent(pool, task, pid, &child_status);
+ fflush(stdout);
+ fflush(stderr);
}
semaphore_post(&pool->semaphore);
return parent_status;
@@ -214,6 +216,7 @@ static int show_log_contents(FILE *stream, struct MultiProcessingTask *task) {
memset(buf, 0, sizeof(buf));
}
fprintf(stream, "\n");
+ fflush(stream);
fclose(fp);
return 0;
}