Skip to content

Commit 8b3a49c

Browse files
committed
task.c: fflush before fork to avoid duplicated output buffers (fix: #67)
1 parent be816fa commit 8b3a49c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/task.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ recode_perform_task (RECODE_TASK task)
300300
subtask->output.cursor = subtask->output.buffer;
301301

302302
#if HAVE_PIPE
303+
/* Flush all outputs to avoid duplicated buffers after calling fork */
304+
fflush (NULL);
305+
303306
/* Create all subprocesses, from the first to the last, and
304307
interconnect them. */
305308

0 commit comments

Comments
 (0)