Re: [PATCH 5/5] selftests/resctrl: Flush stdout file buffer before executing fork()
From: Reinette Chatre
Date: Thu Sep 22 2022 - 13:52:30 EST
On 9/13/2022 6:51 PM, Shaopeng Tan wrote:
> When a process has buffered output, a child process created by fork()
> will also copy buffered output. When using kselftest framework,
> the output (resctrl test result message) will be printed multiple times.
>
> Add fflush() to flush out the buffered output before executing fork().
>
> Signed-off-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Thank you Shaopeng.
Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Reinette