|
|
@ -2653,8 +2653,8 @@ static void *socketer(__maybe_unused void *arg) |
|
|
|
snprintf(reply, sizeof(reply), "%s.%ld.?.", id, now.tv_sec); |
|
|
|
snprintf(reply, sizeof(reply), "%s.%ld.?.", id, now.tv_sec); |
|
|
|
send_unix_msg(sockd, reply); |
|
|
|
send_unix_msg(sockd, reply); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case CMD_SHUTDOWN: |
|
|
|
case CMD_TERMINATE: |
|
|
|
LOGWARNING("Listener received shutdown message, terminating ckdb"); |
|
|
|
LOGWARNING("Listener received terminate message, terminating ckdb"); |
|
|
|
snprintf(reply, sizeof(reply), "%s.%ld.ok.exiting", id, now.tv_sec); |
|
|
|
snprintf(reply, sizeof(reply), "%s.%ld.ok.exiting", id, now.tv_sec); |
|
|
|
send_unix_msg(sockd, reply); |
|
|
|
send_unix_msg(sockd, reply); |
|
|
|
everyone_die = true; |
|
|
|
everyone_die = true; |
|
|
@ -2990,7 +2990,7 @@ static bool reload_line(PGconn *conn, char *filename, uint64_t count, char *buf) |
|
|
|
case CMD_REPLY: |
|
|
|
case CMD_REPLY: |
|
|
|
break; |
|
|
|
break; |
|
|
|
// Shouldn't be there
|
|
|
|
// Shouldn't be there
|
|
|
|
case CMD_SHUTDOWN: |
|
|
|
case CMD_TERMINATE: |
|
|
|
case CMD_PING: |
|
|
|
case CMD_PING: |
|
|
|
case CMD_VERSION: |
|
|
|
case CMD_VERSION: |
|
|
|
case CMD_LOGLEVEL: |
|
|
|
case CMD_LOGLEVEL: |
|
|
@ -3198,7 +3198,7 @@ static bool reload_from(tv_t *start) |
|
|
|
|
|
|
|
|
|
|
|
LOGWARNING("%s(): %sread %"PRIu64" line%s from %s", |
|
|
|
LOGWARNING("%s(): %sread %"PRIu64" line%s from %s", |
|
|
|
__func__, |
|
|
|
__func__, |
|
|
|
everyone_die ? "Shutdown, aborting - " : "", |
|
|
|
everyone_die ? "Terminate, aborting - " : "", |
|
|
|
count, count == 1 ? "" : "s", |
|
|
|
count, count == 1 ? "" : "s", |
|
|
|
filename); |
|
|
|
filename); |
|
|
|
total += count; |
|
|
|
total += count; |
|
|
@ -4284,7 +4284,7 @@ int main(int argc, char **argv) |
|
|
|
sigaction(SIGTERM, &handler, NULL); |
|
|
|
sigaction(SIGTERM, &handler, NULL); |
|
|
|
sigaction(SIGINT, &handler, NULL); |
|
|
|
sigaction(SIGINT, &handler, NULL); |
|
|
|
|
|
|
|
|
|
|
|
/* Shutdown from here if the listener is sent a shutdown message */ |
|
|
|
/* Terminate from here if the listener is sent a terminate message */ |
|
|
|
join_pthread(ckp.pth_listener); |
|
|
|
join_pthread(ckp.pth_listener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -4299,9 +4299,9 @@ int main(int argc, char **argv) |
|
|
|
curr = time(NULL); |
|
|
|
curr = time(NULL); |
|
|
|
if (curr - start > 4) { |
|
|
|
if (curr - start > 4) { |
|
|
|
if (curr - trigger > 4) { |
|
|
|
if (curr - trigger > 4) { |
|
|
|
msg = "Shutdown initial delay"; |
|
|
|
msg = "Terminate initial delay"; |
|
|
|
} else if (curr - trigger > 2) { |
|
|
|
} else if (curr - trigger > 2) { |
|
|
|
msg = "Shutdown delay"; |
|
|
|
msg = "Terminate delay"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (msg) { |
|
|
|
if (msg) { |
|
|
|