From 4ee3deab8faea1d3730bee45f27a9d6f318beaa9 Mon Sep 17 00:00:00 2001 From: Simon Sadedin Date: Mon, 11 Dec 2023 16:26:14 +1100 Subject: [PATCH] fix incorrect exit code returned from process exec in utils when timeout specified --- src/main/groovy/bpipe/Utils.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/groovy/bpipe/Utils.groovy b/src/main/groovy/bpipe/Utils.groovy index bbd8ca79..70c2f65d 100644 --- a/src/main/groovy/bpipe/Utils.groovy +++ b/src/main/groovy/bpipe/Utils.groovy @@ -1026,6 +1026,9 @@ class Utils { } Thread.sleep(2000) } + + if(!p.isAlive()) + result.exitValue = p.exitValue() } else { result.exitValue = p.waitFor()