16 May
2014
16 May
'14
6:55 p.m.
cleanup was recently changed to exit 0 if no arguments are passed. Since trap_exit calls cleanup with no arguments, it always exits 0, regardless of the original parameter to exit. This patch passes the parameter from exit to cleanup. --- lib/common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/common.sh b/lib/common.sh index b885080..55dc9ad 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -79,8 +79,9 @@ trap_abort() { } trap_exit() { + STATUS=$? trap - EXIT INT QUIT TERM HUP - cleanup + cleanup $STATUS } die() { -- 1.9.2