X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=inline;f=tfc_skein.c;h=8102f70af122cff0cbeb7055150ea83267238494;hb=f98c367a4cf1ed9f0c6d7620e3f1988596945495;hp=7008e48fb5dd541fc18b5ea0785c60262b692753;hpb=f761a53231d1a023e2d3e5efcc5591b04a34f98a;p=tfcrypt.git diff --git a/tfc_skein.c b/tfc_skein.c index 7008e48..8102f70 100644 --- a/tfc_skein.c +++ b/tfc_skein.c @@ -170,7 +170,6 @@ _dothat: sigact.sa_flags = SA_RESTART; sigact.sa_handler = print_crypt_status; sigaction(SIGUSR1, &sigact, NULL); - sigaction(SIGTSTP, &sigact, NULL); sigaction(SIGALRM, &sigact, NULL); sigact.sa_handler = change_status_width; sigaction(SIGQUIT, &sigact, NULL); @@ -179,6 +178,8 @@ _dothat: 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)); tfc_getcurtime(&delta_time); @@ -221,7 +222,7 @@ _dothat: continue; } - if (status_timer) setup_next_alarm(status_timer); + if (status_timer) setup_next_alarm(status_timer > 1000000 ? 1000000 : status_timer); if (skeinfd(hash, bits, mackey_opt ? mackey : NULL, fd, iseek, maxlen) != YES) { xerror(YES, NO, YES, "%s", fname); exitcode = 1; @@ -273,7 +274,7 @@ _dothat: continue; } -_dohash: if (status_timer) setup_next_alarm(status_timer); +_dohash: if (status_timer) setup_next_alarm(status_timer > 1000000 ? 1000000 : status_timer); if (skeinfd(hash, bits, mackey_opt ? mackey : NULL, fd, iseek, maxlen) != YES) { xerror(YES, NO, YES, "%s", fargv[x]); exitcode = 1;