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

Function redisCommunicateSystemd

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

Send a notify message to systemd. Returns sd_notify return code which is * a positive number on success. */

Source from the content-addressed store, hash-verified

6050/* Send a notify message to systemd. Returns sd_notify return code which is
6051 * a positive number on success. */
6052int redisCommunicateSystemd(const char *sd_notify_msg) {
6053#ifdef HAVE_LIBSYSTEMD
6054 int ret = sd_notify(0, sd_notify_msg);
6055
6056 if (ret == 0)
6057 serverLog(LL_WARNING, "systemd supervision error: NOTIFY_SOCKET not found!");
6058 else if (ret < 0)
6059 serverLog(LL_WARNING, "systemd supervision error: sd_notify: %d", ret);
6060 return ret;
6061#else
6062 UNUSED(sd_notify_msg);
6063 return 0;
6064#endif
6065}
6066
6067/* Attempt to set up upstart supervision. Returns 1 if successful. */
6068static int redisSupervisedUpstart(void) {

Callers 5

readSyncBulkPayloadFunction · 0.85
syncWithMasterFunction · 0.85
prepareForShutdownFunction · 0.85
redisSupervisedSystemdFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected