From c15407e68af7987d4b1a093197078892ed13cf37 Mon Sep 17 00:00:00 2001 From: kanoi Date: Mon, 6 Apr 2015 22:40:25 +1000 Subject: [PATCH] ckdb - change shutdown to terminate --- src/ckdb.c | 14 +++++++------- src/ckdb.h | 4 ++-- src/ckdb_cmd.c | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index 7dd3f9af..45ceafa8 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -2653,8 +2653,8 @@ static void *socketer(__maybe_unused void *arg) snprintf(reply, sizeof(reply), "%s.%ld.?.", id, now.tv_sec); send_unix_msg(sockd, reply); break; - case CMD_SHUTDOWN: - LOGWARNING("Listener received shutdown message, terminating ckdb"); + case CMD_TERMINATE: + LOGWARNING("Listener received terminate message, terminating ckdb"); snprintf(reply, sizeof(reply), "%s.%ld.ok.exiting", id, now.tv_sec); send_unix_msg(sockd, reply); everyone_die = true; @@ -2990,7 +2990,7 @@ static bool reload_line(PGconn *conn, char *filename, uint64_t count, char *buf) case CMD_REPLY: break; // Shouldn't be there - case CMD_SHUTDOWN: + case CMD_TERMINATE: case CMD_PING: case CMD_VERSION: case CMD_LOGLEVEL: @@ -3198,7 +3198,7 @@ static bool reload_from(tv_t *start) LOGWARNING("%s(): %sread %"PRIu64" line%s from %s", __func__, - everyone_die ? "Shutdown, aborting - " : "", + everyone_die ? "Terminate, aborting - " : "", count, count == 1 ? "" : "s", filename); total += count; @@ -4284,7 +4284,7 @@ int main(int argc, char **argv) sigaction(SIGTERM, &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); } @@ -4299,9 +4299,9 @@ int main(int argc, char **argv) curr = time(NULL); if (curr - start > 4) { if (curr - trigger > 4) { - msg = "Shutdown initial delay"; + msg = "Terminate initial delay"; } else if (curr - trigger > 2) { - msg = "Shutdown delay"; + msg = "Terminate delay"; } } if (msg) { diff --git a/src/ckdb.h b/src/ckdb.h index d3ffab10..4a8ff141 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -55,7 +55,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.0" -#define CKDB_VERSION DB_VERSION"-1.051" +#define CKDB_VERSION DB_VERSION"-1.052" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__ @@ -343,7 +343,7 @@ extern char *id_default; enum cmd_values { CMD_UNSET, CMD_REPLY, // Means something was wrong - send back reply - CMD_SHUTDOWN, + CMD_TERMINATE, CMD_PING, CMD_VERSION, CMD_LOGLEVEL, diff --git a/src/ckdb_cmd.c b/src/ckdb_cmd.c index 4d0214f3..483463cb 100644 --- a/src/ckdb_cmd.c +++ b/src/ckdb_cmd.c @@ -2227,9 +2227,9 @@ seconf: return strdup("failed.DATA"); } else { /* Don't slow down the reload - do them later - * N.B. this means if you abort/shutdown the reload, + * N.B. this means if you abort/terminate the reload, * next restart will again go back to the oldest - * unaged sharesummary due to a pool shutdown */ + * unaged sharesummary due to a pool terminate */ if (!reloading) { // Aging is a queued item thus the reply is ignored auto_age_older(conn, workinfoid, @@ -5653,7 +5653,7 @@ dame: * ping * .STAMP.ok.pong * - * shutdown + * terminate * .STAMP.ok.exiting * * With an ID @@ -5683,7 +5683,7 @@ dame: // cmd_val cmd_str noid createdate func access struct CMDS ckdb_cmds[] = { - { CMD_SHUTDOWN, "shutdown", true, false, NULL, ACCESS_SYSTEM }, + { CMD_TERMINATE, "terminate", true, false, NULL, ACCESS_SYSTEM }, { CMD_PING, "ping", true, false, NULL, ACCESS_SYSTEM ACCESS_POOL ACCESS_WEB }, { CMD_VERSION, "version", true, false, NULL, ACCESS_SYSTEM ACCESS_POOL ACCESS_WEB }, { CMD_LOGLEVEL, "loglevel", true, false, NULL, ACCESS_SYSTEM },