From c7b8ffb70162c12abcfe73ee792ebc21d7121f3c Mon Sep 17 00:00:00 2001 From: Eric F Crist Date: Sat, 26 Jan 2019 16:57:54 -0600 Subject: [PATCH] Fix trap() and prog_exit() so it exits correctly Fixes #282 Signed-off-by: Eric F Crist --- easyrsa3/easyrsa | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 48ea8b8..16ba40d 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1621,7 +1621,11 @@ done vars_setup # Register clean_temp and prog_exit on SIGHUP, SIGINT, SIGQUIT, and SIGABRT -trap "clean_temp; prog_exit" 0 1 2 3 6 +trap "clean_temp; prog_exit 1" 1 +trap "clean_temp; prog_exit 2" 2 +trap "clean_temp; prog_exit 3" 3 +trap "clean_temp; prog_exit 6" 6 +trap "clean_temp; prog_exit 15" 15 # determine how we were called, then hand off to the function responsible cmd="$1"