MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / redisSupervisedUpstart

Function redisSupervisedUpstart

src/server.cpp:7197–7210  ·  view source on GitHub ↗

Attempt to set up upstart supervision. Returns 1 if successful. */

Source from the content-addressed store, hash-verified

7195
7196/* Attempt to set up upstart supervision. Returns 1 if successful. */
7197static int redisSupervisedUpstart(void) {
7198 const char *upstart_job = getenv("UPSTART_JOB");
7199
7200 if (!upstart_job) {
7201 serverLog(LL_WARNING,
7202 "upstart supervision requested, but UPSTART_JOB not found!");
7203 return 0;
7204 }
7205
7206 serverLog(LL_NOTICE, "supervised by upstart, will stop to signal readiness.");
7207 raise(SIGSTOP);
7208 unsetenv("UPSTART_JOB");
7209 return 1;
7210}
7211
7212/* Attempt to set up systemd supervision. Returns 1 if successful. */
7213static int redisSupervisedSystemd(void) {

Callers 1

redisIsSupervisedFunction · 0.85

Calls 1

serverLogFunction · 0.85

Tested by

no test coverage detected