MCPcopy Create free account
hub / github.com/F-Stack/f-stack / redisSupervisedSystemd

Function redisSupervisedSystemd

app/redis-6.2.6/src/server.c:6084–6096  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

6082
6083/* Attempt to set up systemd supervision. Returns 1 if successful. */
6084static int redisSupervisedSystemd(void) {
6085#ifndef HAVE_LIBSYSTEMD
6086 serverLog(LL_WARNING,
6087 "systemd supervision requested or auto-detected, but Redis is compiled without libsystemd support!");
6088 return 0;
6089#else
6090 if (redisCommunicateSystemd("STATUS=Redis is loading...\n") <= 0)
6091 return 0;
6092 serverLog(LL_NOTICE,
6093 "Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec and TimeoutStopSec in your service unit.");
6094 return 1;
6095#endif
6096}
6097
6098int redisIsSupervised(int mode) {
6099 int ret = 0;

Callers 1

redisIsSupervisedFunction · 0.85

Calls 1

redisCommunicateSystemdFunction · 0.85

Tested by

no test coverage detected