diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cpp b/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cpp --- a/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cpp @@ -32,6 +32,9 @@ fprintf(stderr, "Parent PID: %d\n", getpid()); foo(); bar(); + + // Wait for the child process(s) to finish + while(wait(NULL) > 0); } return 0; }