diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index 5856e8355e..9598dd75c1 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -219,8 +219,11 @@ static bool odls_default_child_died(pid_t pid, unsigned int timeout, int *exit_s return true; } - /* Sleep for a second */ - sleep(1); +#if defined(__WINDOWS__) + SwitchToThread(); +#elif defined(HAVE_SCHED_YIELD) + sched_yield(); +#endif } while (time(NULL) < end); /* The child didn't die, so return false */