supervise-daemon: multiple fixes

- Harden against dying by handling all signals that would terminate the
program and adding --reexec support
- factor the supervisor into its own function
- fix test for whether we are already running
This commit is contained in:
William Hubbs
2017-10-24 10:26:18 -05:00
parent 35b1996704
commit fdce4769f2
3 changed files with 349 additions and 246 deletions
+1
View File
@@ -47,6 +47,7 @@ bool rc_conf_yesno(const char *var);
void env_filter(void);
void env_config(void);
int signal_setup(int sig, void (*handler)(int));
int signal_setup_restart(int sig, void (*handler)(int));
int svc_lock(const char *);
int svc_unlock(const char *, int);
pid_t exec_service(const char *, const char *);