MCPcopy Create free account
hub / github.com/apache/kvrocks / SupervisedUpstart

Function SupervisedUpstart

src/cli/daemon_util.h:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "unique_fd.h"
33
34inline bool SupervisedUpstart() {
35 const char *upstart_job = getenv("UPSTART_JOB");
36 if (!upstart_job) {
37 WARN("upstart supervision requested, but UPSTART_JOB not found");
38 return false;
39 }
40 INFO("supervised by upstart, will stop to signal readiness");
41 raise(SIGSTOP);
42 unsetenv("UPSTART_JOB");
43 return true;
44}
45
46inline bool SupervisedSystemd() {
47 const char *notify_socket = getenv("NOTIFY_SOCKET");

Callers 1

IsSupervisedModeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected