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-14 10:30:57 -0500
commit63e3b849777aaa70df06876878b4ec460a43080a (patch)
tree44786c0abeafa7af74896502c16b711860cbc470
parent0771a8593fea16e089c50f2ce853423b1450da7c (diff)
downloadstasis-63e3b849777aaa70df06876878b4ec460a43080a.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 b475111..889ec3f 100644
--- a/src/lib/core/multiprocessing.c
+++ b/src/lib/core/multiprocessing.c
@@ -91,6 +91,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;
@@ -215,6 +217,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;
}