cf_pause_mode = P_NONE;
if (tmp_mode == P_SUSPEND)
resume_all();
+
+ /* avoid surprise later if cf_shutdown stays set */
+ if (cf_shutdown) {
+ log_info("canceling shutdown");
+ cf_shutdown = 0;
+ }
}
/* Command: RESUME */
static void handle_sigusr1(int sock, short flags, void *arg)
{
- if (cf_pause_mode == 0) {
+ if (cf_pause_mode == P_NONE) {
log_info("Got SIGUSR1, pausing all activity");
cf_pause_mode = P_PAUSE;
} else {
case P_SUSPEND:
log_info("Got SIGUSR2, continuing from SUSPEND");
resume_all();
- cf_pause_mode = 0;
+ cf_pause_mode = P_NONE;
break;
case P_PAUSE:
log_info("Got SIGUSR2, continuing from PAUSE");
- cf_pause_mode = 0;
+ cf_pause_mode = P_NONE;
break;
case P_NONE:
log_info("Got SIGUSR1, but not paused/suspended");
}
+
+ /* avoid surprise later if cf_shutdown stays set */
+ if (cf_shutdown) {
+ log_info("Canceling shutdown");
+ cf_shutdown = 0;
+ }
}
static void handle_sighup(int sock, short flags, void *arg)