Test at compile time whether siginfo_t is usable for --remote (#119).

This commit is contained in:
Andrew Wood
2024-12-01 15:26:59 +00:00
parent 99fe01a0d6
commit 106a673ba8
7 changed files with 51 additions and 11 deletions
+3
View File
@@ -223,6 +223,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Signal handlers can determine the sending PID */
#undef SIGINFO_PROVIDES_PID
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
+2 -2
View File
@@ -154,13 +154,13 @@ struct pvstate_s {
struct sigaction old_sigint;
struct sigaction old_sighup;
struct sigaction old_sigterm;
#ifdef SA_SIGINFO
#ifdef SIGINFO_PROVIDES_PID
struct sigaction old_sigusr2;
#endif
struct sigaction old_sigalrm;
struct timespec tstp_time; /* see pv_sig_tstp() / __cont() */
struct timespec toffset; /* total time spent stopped */
#ifdef SA_SIGINFO
#ifdef SIGINFO_PROVIDES_PID
volatile sig_atomic_t rxusr2; /* whether SIGUSR2 was received */
volatile pid_t sender; /* PID of sending process for SIGUSR2 */
#endif
+1 -1
View File
@@ -237,7 +237,7 @@ extern off_t pv_calc_total_size(pvstate_t);
*/
extern void pv_sig_init(pvstate_t);
#ifdef SA_SIGINFO
#ifdef SIGINFO_PROVIDES_PID
/*
* Return true if SIGUSR2 has been received, and indicate the sender.
*/