make pa kill itself on SIGINT make pa exit with the correct status code and report to the shell that it died from SIGINT, which is for example used by bash to print a newline after the interruption. also remove EXIT trap as pa is never terminated by exit between sttys, rendering this trap useless.
arĉi arcxi@dismail.de
Thu, 20 Jun 2024 15:59:22 +0200
1 files changed,
2 insertions(+),
3 deletions(-)
jump to
M
pa
→
pa
@@ -281,9 +281,8 @@
[ -f "$recipients_file" ] || age-keygen -y -o "$recipients_file" "$identities_file" 2>/dev/null - # Ensure that we leave the terminal in a usable - # state on exit or Ctrl+C. - [ -t 1 ] && trap 'stty echo icanon; exit' INT EXIT + # Ensure that we leave the terminal in a usable state on Ctrl+C. + [ -t 1 ] && trap 'stty echo icanon; trap - INT; kill -s INT 0' INT case $1 in a*) pw_add "$2" ;;