X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/611d822b02f836d7abe031cced6adc4281ef4356..9099504f0b246a1031adb644ac0835d526a33ffd:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 4f93d34dea..ca795e226a 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -270,7 +270,9 @@ if [ -z "${HOSTFILE}" ] ; then HOSTFILETMP=1 HOSTFILE="$(mktemp smpitmp-hostfXXXXXX)" perl -ne 'print "$1\n" if /.*.*/' ${PLATFORM} > ${HOSTFILE} - perl -ne 'if (/.*> ${HOSTFILE} fi UNROLLEDHOSTFILETMP=0 @@ -500,6 +502,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