Reputation: 826
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?
Upvotes: 0
Views: 368
Reputation: 1439
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 of exit -1
).
Using error
would cause a stack trace to be shown - expected behavior.
Upvotes: 1