From c59871a5018927836af991799022c2831cdccb5d Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 27 Sep 2024 10:00:20 -0400 Subject: "Task started" message is redundant --- src/multiprocessing.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/multiprocessing.c b/src/multiprocessing.c index 3c3c5eb..1bd9ec0 100644 --- a/src/multiprocessing.c +++ b/src/multiprocessing.c @@ -25,7 +25,8 @@ int child(struct MultiProcessingPool *pool, struct MultiProcessingTask *task) { // Redirect stdout and stderr to the log file fflush(stdout); fflush(stderr); - printf("[%s:%s] Task started (pid: %d)\n", pool->ident, task->ident, task->parent_pid); + // Set log file name + sprintf(task->log_file + strlen(task->log_file), "task-%zu-%d.log", mp_global_task_count, task->parent_pid); fp_log = freopen(task->log_file, "w+", stdout); if (!fp_log) { fprintf(stderr, "unable to open '%s' for writing: %s\n", task->log_file, strerror(errno)); -- cgit