We have an 'exit -1' command inside a conditional which is nested down inside a few more levels of conditionals.
On redhat linux 5.8, after exiting at the 'exit -1', all of the surrounding / enclosing lines of code are displayed, all the way up to the top level enclosing conditional / enclosing set of braces.
We see the same behavior when using 'error' in place of 'exit'.
Is there a way to suppress this display?
The manual says "exit terminates the running process", so if this causes code to be displayed your setup must be more complex than you said.
Guessing: your script is
exec
uted by another script, the first one blows up at receiving returncode 255 (result ofexit -1
).Using
error
would cause a stack trace to be shown - expected behavior.