X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfcrypt.c;h=3a7d3034bb61e9866521d699f79d1e1cefa4635a;hb=10fd1044fc86d4537fdc6b05320f5a3d3996727d;hp=6ac7bdceb4da6879c98df6f6483e4cf4d3026559;hpb=a2ba0ca55c0bccf3695f9fdfacfbd991a2a73cf1;p=tfcrypt.git diff --git a/tfcrypt.c b/tfcrypt.c index 6ac7bdc..3a7d303 100644 --- a/tfcrypt.c +++ b/tfcrypt.c @@ -1071,7 +1071,6 @@ _plain: sigact.sa_flags = SA_RESTART; sigact.sa_handler = print_crypt_status; sigaction(SIGUSR1, &sigact, NULL); - sigaction(SIGTSTP, &sigact, NULL); sigaction(SIGALRM, &sigact, NULL); if (status_timer) setup_next_alarm(status_timer); sigact.sa_handler = change_status_width; @@ -1082,11 +1081,14 @@ _plain: sigact.sa_handler = print_crypt_status; sigaction(SIGINT, &sigact, NULL); sigaction(SIGTERM, &sigact, NULL); + sigaction(SIGTSTP, &sigact, NULL); } else { sigact.sa_handler = exit_sigterm; sigaction(SIGINT, &sigact, NULL); sigaction(SIGTERM, &sigact, NULL); + sigact.sa_handler = handle_sigtstp; + sigaction(SIGTSTP, &sigact, NULL); } memset(&sigact, 0, sizeof(struct sigaction)); @@ -1374,14 +1376,6 @@ _macwagain: lio = xwrite(dfd, pblk, lrem); if (verbose || status_timer || do_stop == YES) print_crypt_status(0); - if (do_preserve_time) fcopy_matime(dfd, &s_stat); - xclose(sfd); - if (do_ftrunc > TFC_NO_FTRUNC) { - if (do_ftrunc == TFC_FTRUNC_TAIL) ftrunc_dfd = total_processed_dst; - if (ftruncate(dfd, (off_t)ftrunc_dfd) == -1) xerror(YES, NO, YES, "ftruncate(%d)", dfd); - } - xclose(dfd); - xexit(exitcode); return -1; }