diff --git a/lib/aaa_errors.sh b/lib/aaa_errors.sh index 5aaabfb..6cc7a7f 100644 --- a/lib/aaa_errors.sh +++ b/lib/aaa_errors.sh @@ -9,6 +9,14 @@ function die() } export -f die +function terminate() +{ + prnt E "$1 reçu, sortie immédiate." + die 128 +} +trap terminate 'Ctrl + C' SIGINT +trap terminate 'SIGTERM' SIGTERM + function error() { # Check the call is actually the result of an error @@ -37,7 +45,6 @@ function error() # Trigger error function on error trap error ${LINENO} ERR - # Print a backtrace function backtrace {