From: Arnaud Giersch Date: Sat, 12 May 2018 19:34:19 +0000 (+0200) Subject: Try again when wait returns 128. X-Git-Tag: v3.20~234 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4e65bc17002995ec4d2392363da49c35edcab692?hp=e07649791cb63debbcc39a41fb3621dee457c477 Try again when wait returns 128. --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 4f93d34dea..e8f17431ec 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -500,6 +500,12 @@ pid=$! exec 3>&- wait $pid status=$? +# With dash on Windows WSL/Ubuntu, "wait" sometimes returns early with an exit +# status of 128. Try again. +while test $status -eq 128 && kill -0 $pid 2>/dev/null; do + wait $pid + status=$? +done pid="" # Keep temporary files on failures to help debugging