diff --git a/gloo/test/multiproc_test.cc b/gloo/test/multiproc_test.cc index dbee0d69c..86863f096 100644 --- a/gloo/test/multiproc_test.cc +++ b/gloo/test/multiproc_test.cc @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -65,7 +66,7 @@ void MultiProcTest::spawnAsync( // Forked process will create a Context and run the provided function, // exiting upon completion. const auto result = runWorker(transport, numRanks, i, true, fn); - exit(result); + _exit(result); } else { // Parent process tracks all forked child processes. workers_.push_back(pid); @@ -96,7 +97,7 @@ void MultiProcTest::spawnAsyncNoBarrier( // Forked process will create a Context and run the provided function, // exiting upon completion. const auto result = runWorker(transport, numRanks, i, false, fn); - exit(result); + _exit(result); } else { // Parent process tracks all forked child processes. workers_.push_back(pid);