When trapping a signal in bash, how could you then retrieve the signal which has been trapped?
For instance:
trap "cleanup;exit $SIGNAL" SIGINT SIGTERM
Such that the cleanup function is executed but the script still exits with its "correct" code.
Or is the signal not the correct exit code for an interrupted process?