Rename signal.sender to signal.sender_usr2 so it is specific to SIGUSR2 (#101).

This commit is contained in:
Andrew Wood
2025-10-21 22:15:23 +01:00
parent 9bd96614b3
commit 8361ed1fe2
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -236,7 +236,7 @@ struct pvstate_s {
struct timespec toffset; /* total time spent stopped */
#ifdef PV_REMOTE_CONTROL
volatile sig_atomic_t rxusr2; /* whether SIGUSR2 was received */
volatile pid_t sender; /* PID of sending process for SIGUSR2 */
volatile pid_t sender_usr2; /* PID of sending process for SIGUSR2 */
#endif
} signal;
+2 -2
View File
@@ -239,7 +239,7 @@ static void pv_sig_usr2( /*@unused@ */ __attribute__((unused))
return;
if (NULL == info)
return;
pv_sig_state->signal.sender = info->si_pid;
pv_sig_state->signal.sender_usr2 = info->si_pid;
pv_sig_state->signal.rxusr2 = 1;
}
@@ -255,7 +255,7 @@ bool pv_sigusr2_received(pvstate_t state, pid_t * pid)
if (0 == state->signal.rxusr2)
return false;
if (NULL != pid)
*pid = state->signal.sender;
*pid = state->signal.sender_usr2;
state->signal.rxusr2 = 0;
return true;
}