mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
lib: ensure any buffers are flushed before fork
Flush any buffers before forking to prevent duplicated output. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
parent
519f377ddd
commit
756764a4e7
@ -928,6 +928,10 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
|
|||||||
*/
|
*/
|
||||||
tmp_count = exit_handler_count;
|
tmp_count = exit_handler_count;
|
||||||
exit_handler_count = 0;
|
exit_handler_count = 0;
|
||||||
|
|
||||||
|
/* ensure any buffers are flushed before fork */
|
||||||
|
fflush(NULL);
|
||||||
|
|
||||||
switch (pid = fork()) {
|
switch (pid = fork()) {
|
||||||
case -1:
|
case -1:
|
||||||
exit_handler_count = tmp_count;
|
exit_handler_count = tmp_count;
|
||||||
@ -1019,6 +1023,9 @@ bool __igt_fork(void)
|
|||||||
igt_assert(test_children);
|
igt_assert(test_children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ensure any buffers are flushed before fork */
|
||||||
|
fflush(NULL);
|
||||||
|
|
||||||
switch (test_children[num_test_children++] = fork()) {
|
switch (test_children[num_test_children++] = fork()) {
|
||||||
case -1:
|
case -1:
|
||||||
igt_assert(0);
|
igt_assert(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user