...
It should be noted that the default error trapping will call exit(0), hence the default ECF_JOB_CMD will correct;y correctly handle ECF_TRIES.
Code Block | ||||
---|---|---|---|---|
| ||||
.... # Defined a error handler ERROR() { echo "ERROR called" set +e # Clear -e flag, so we don't fail wait # wait for background process to stop trap 0 1 2 3 4 5 6 7 8 10 12 13 15 # when the following signals arrive do nothing, stops recursive signals/error function being called ecflow_client --abort # Notify ecflow that something went wrong trap 0 # Remove the trap exit 0 # End the script. Notice that we call exit(0) } |
...