From 4e65bc17002995ec4d2392363da49c35edcab692 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 12 May 2018 21:34:19 +0200 Subject: [PATCH 1/1] Try again when wait returns 128. --- src/smpi/smpirun.in | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.20.1