Don't keep PV_REMOTE_QUERY separate from PV_REMOTE_CONTROL after all since they will need to work together; extend pv_remote_check() so it will check for both -R and -Q signals (#101).
This commit is contained in:
@@ -44,18 +44,10 @@ typedef bool _Bool;
|
||||
# define __bool_true_false_are_defined 1
|
||||
#endif
|
||||
|
||||
/* Whether "--remote" should be available. */
|
||||
/* Whether "--remote" and "--query" should be available. */
|
||||
#undef PV_REMOTE_CONTROL
|
||||
#if HAVE_DECL_SA_SIGINFO
|
||||
# if SIGINFO_PROVIDES_PID
|
||||
#define PV_REMOTE_CONTROL 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Whether "--query" should be available. */
|
||||
#undef PV_REMOTE_QUERY
|
||||
#if HAVE_DECL_SA_SIGINFO
|
||||
# if SIGINFO_PROVIDES_PID
|
||||
#define PV_REMOTE_QUERY 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -230,8 +230,6 @@ struct pvstate_s {
|
||||
struct sigaction old_sigterm;
|
||||
#ifdef PV_REMOTE_CONTROL
|
||||
struct sigaction old_sigusr2;
|
||||
#endif
|
||||
#ifdef PV_REMOTE_QUERY
|
||||
struct sigaction old_sigusr1;
|
||||
#endif
|
||||
struct sigaction old_sigalrm;
|
||||
@@ -240,8 +238,6 @@ struct pvstate_s {
|
||||
#ifdef PV_REMOTE_CONTROL
|
||||
volatile sig_atomic_t rxusr2; /* whether SIGUSR2 was received */
|
||||
volatile pid_t sender_usr2; /* PID of sending process for SIGUSR2 */
|
||||
#endif
|
||||
#ifdef PV_REMOTE_QUERY
|
||||
volatile sig_atomic_t rxusr1; /* whether SIGUSR1 was received */
|
||||
volatile pid_t sender_usr1; /* PID of sending process for SIGUSR1 */
|
||||
#endif
|
||||
|
||||
@@ -267,6 +267,11 @@ extern void pv_sig_init(pvstate_t);
|
||||
* Return true if SIGUSR2 has been received, and indicate the sender.
|
||||
*/
|
||||
extern bool pv_sigusr2_received(pvstate_t, pid_t *);
|
||||
|
||||
/*
|
||||
* Return true if SIGUSR1 has been received, and indicate the sender.
|
||||
*/
|
||||
extern bool pv_sigusr1_received(pvstate_t, pid_t *);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user