summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-02 10:19:28 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-02 10:27:22 (EDT)
commit1139087d30d0eaae0e6f6bb83db93c093bde4a06 (patch)
tree27a46ed2b19b019576231da3f73f9ca21056635e /lib
parentd14509d2843ba04a8eb38165249bde64e77be4d1 (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/output.sh7
1 files changed, 4 insertions, 3 deletions
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()