Consider a following procedural (groovy) pipeline:
```
timeout(1) {
sh(script: '''
trap 'echo "jenkins int"' SIGINT SIGTERM
./bash_script.sh
''')
}
```
where the `bash_script.sh` looks like this:
```bash
trap 'echo "in bash script"' SIGINT SIGTERM
sleep inf &
wait -n
```
When the timeout lapses, neither of these traps get fired and the SIGINT signal gets sent to the backgrounded sleep process spawned in the script.
If you spawn multiple such background processes in a script, there appears to be no good way to tell which one received a signal and if its termination was due to a timeout signal. If the process "just" happens to exit with exit code 0 when it receives `SIGINT` then the whole step will be marked as //successful// and not "timed out".