Correct issues #34, #86, #87 - progress output stopping when writing output data blocks - by adding a SIGALRM handler, since ignoring the signal prevents it from interrupting writes; and use setitimer() where available, instead of alarm(), to provide sufficient granularity to handle the case where the --interval is not a whole number of seconds.

This commit is contained in:
Andrew Wood
2024-04-21 13:54:01 +01:00
parent 3a41665302
commit b375041790
7 changed files with 84 additions and 9 deletions
+3
View File
@@ -100,6 +100,9 @@
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
+1
View File
@@ -157,6 +157,7 @@ struct pvstate_s {
#ifdef SA_SIGINFO
struct sigaction old_sigusr2;
#endif
struct sigaction old_sigalrm;
} signal;
/*******************