Minimal example of the issue: #!/bin/bash errHandler() { echo “Something went wrong. Exiting now.” exit 1 } trap ‘errHandler’ ERR INT pi_process () { bin/pi $@ echo $? } pi_process …
Minimal example of the issue: #!/bin/bash errHandler() { echo “Something went wrong. Exiting now.” exit 1 } trap ‘errHandler’ ERR INT pi_process () { bin/pi $@ echo $? } pi_process …