diff --git a/src/main/java/org/jenkinsci/plugins/durabletask/BourneShellScript.java b/src/main/java/org/jenkinsci/plugins/durabletask/BourneShellScript.java index c80f952b..2ece052b 100644 --- a/src/main/java/org/jenkinsci/plugins/durabletask/BourneShellScript.java +++ b/src/main/java/org/jenkinsci/plugins/durabletask/BourneShellScript.java @@ -141,7 +141,8 @@ public String getScript() { ShellController c = new ShellController(ws,(os == OsType.ZOS), cookieValue, jenkinsResultTxtEncoding); FilePath shf = c.getScriptFile(ws); - // here we need to keep the file open for a longer time to make the race to happen more likely + // JENKINS-70874: if a new process is forked during this call, the writeable file handle will be copied and leading to the "Text file busy" issue + // when executing the script. shf.write(script, scriptEncodingCharset); String shell = null;