On 03/10/2014 08:33 PM, Kurtis Rader wrote:
Please don't use that technique unless it's in the context of something
atypical like a debugger. It's a really bad software pattern. It's spooky
action at a distance. It's a form of monkey-patching. it practically
guarantees hard to debug errors. Plus a large number of other problems.
Don't do it. Be explicit about return values. If you want a caller of
function2 to exit immediately have function2 return non-zero and test for
that. For example,
function2() { print I failed to do my job; return 1 }
function1() { if ! function2; then; print unexpected failure; return 0; fi;
print life is good }