Part of the fix for https://issues.jenkins.io/browse/JENKINS-58290 added a System Property to revert to the legacy behavior using the flag -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true
It would be better to have a way to specify it for each sh step via an optional parameter. That way I could keep the whole system with the current behavior but turn it off for specific sh steps that have issues with running as a background process.
The use case right now is when I run sysbox, it looses track of the syscalls when this is run as a background process and fails. If I kubectl exec to the container and run my scripts in the shell there it works, but not when BourneShellScript runs it as a background process.
I want a way to set that per sh instead of system wide as it is currently with the System Property.