Send a notify message to systemd. Returns sd_notify return code which is * a positive number on success. */
| 6050 | /* Send a notify message to systemd. Returns sd_notify return code which is |
| 6051 | * a positive number on success. */ |
| 6052 | int 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. */ |
| 6068 | static int redisSupervisedUpstart(void) { |
no outgoing calls
no test coverage detected