X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfc_signal.c;h=a81aa1efcd85d9faa1d16d1bfef5eab5dcb7c566;hb=HEAD;hp=1e025349a52c70e73a6c945d1ac141353ad0bdcc;hpb=e16562d4f4180c1364181c92d6d8f285f322f12c;p=tfcrypt.git diff --git a/tfc_signal.c b/tfc_signal.c index 1e02534..a81aa1e 100644 --- a/tfc_signal.c +++ b/tfc_signal.c @@ -30,6 +30,7 @@ void exit_sigterm(int signal) { + tfc_esay("\n"); xexit(0); } @@ -55,10 +56,9 @@ void print_crypt_status(int signal) tfc_yesno finished = NO; if (last == YES) return; - if (signal <= 0) { + if (signal == TFC_SIGLAST) { + last = YES; finished = YES; - do_stop = YES; /* error path or sksum finished */ - if (signal == 0) last = YES; } switch (do_edcrypt) { @@ -66,6 +66,7 @@ void print_crypt_status(int signal) case TFC_DO_DECRYPT: oper_mode = "decrypted"; break; default: if (ctr_mode == TFC_MODE_PLAIN) oper_mode = "written"; + else if (ctr_mode == TFC_MODE_XOR) oper_mode = "xored"; else if (ctr_mode == TFC_MODE_SKSUM) oper_mode = "hashed"; else oper_mode = NULL; break; @@ -129,6 +130,7 @@ void print_crypt_status(int signal) } if (do_stop == NO && do_statline_dynamic == NO) tfc_esay("\n"); + else if (signal == TFC_SIGLAST || signal == TFC_SIGERR) tfc_esay("\n"); statline_was_shown = YES; if ((signal == SIGINT || signal == SIGTERM) && do_stop == YES) exit_sigterm(signal);