Project

General

Profile

« Previous | Next » 

Revision 13228

bugfix: lib/sh/util.sh: added workaround for bash bug where exit sometimes inxeplicably ignores $?

View differences:

trunk/lib/sh/util.sh
226 226

  
227 227
#### exceptions
228 228

  
229
fi # load new aliases
230
if self_being_included; then
231

  
232
exit() { self_builtin "${1:-$?}"; } # exit sometimes inxeplicably ignores $?
233

  
229 234
errexit() # usage: cmd || errexit status # works in functions *and* subshells
230 235
{ return "$1"; }
231 236
	# can't use `(exit "$1")` because a bug in bash prevents subshells from

Also available in: Unified diff