Attempt to set up upstart supervision. Returns 1 if successful. */
| 6066 | |
| 6067 | /* Attempt to set up upstart supervision. Returns 1 if successful. */ |
| 6068 | static int redisSupervisedUpstart(void) { |
| 6069 | const char *upstart_job = getenv("UPSTART_JOB"); |
| 6070 | |
| 6071 | if (!upstart_job) { |
| 6072 | serverLog(LL_WARNING, |
| 6073 | "upstart supervision requested, but UPSTART_JOB not found!"); |
| 6074 | return 0; |
| 6075 | } |
| 6076 | |
| 6077 | serverLog(LL_NOTICE, "supervised by upstart, will stop to signal readiness."); |
| 6078 | raise(SIGSTOP); |
| 6079 | unsetenv("UPSTART_JOB"); |
| 6080 | return 1; |
| 6081 | } |
| 6082 | |
| 6083 | /* Attempt to set up systemd supervision. Returns 1 if successful. */ |
| 6084 | static int redisSupervisedSystemd(void) { |