From 1139087d30d0eaae0e6f6bb83db93c093bde4a06 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 02 May 2014 10:19:28 -0400 Subject: error(): Die by signal. Previously, calling error() within a subshell only caused the subshell to exit. Now the whole shell process should die. Subshells still suck though. --- (limited to 'lib') diff --git a/lib/output.sh b/lib/output.sh index c3f74d5..d3d150f 100644 --- a/lib/output.sh +++ b/lib/output.sh @@ -29,9 +29,10 @@ error() printf '%s: Error: ' "${0##*/}" >&2 printf "${fmt}\n" "${@}" >&2 - fini - - exit ${status} + # In a subshell, this will have no effect, so the shell's exit status + # will be 128+SIGINT. Meh. + exit_status=${status} + kill -s INT ${$} } warn() -- cgit v0.9.1