From 8361ed1fe26b62afb6f46e906a6f7250809f5f1c Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Tue, 21 Oct 2025 22:15:23 +0100 Subject: [PATCH] Rename signal.sender to signal.sender_usr2 so it is specific to SIGUSR2 (#101). --- src/include/pv-internal.h | 2 +- src/pv/signal.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/pv-internal.h b/src/include/pv-internal.h index b47b23b..5c8e565 100644 --- a/src/include/pv-internal.h +++ b/src/include/pv-internal.h @@ -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; diff --git a/src/pv/signal.c b/src/pv/signal.c index 283cff5..c6fd0f9 100644 --- a/src/pv/signal.c +++ b/src/pv/signal.c @@ -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; }