From 6bb7ebec483a96e258c64ea3fea18358d7893fee Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 27 Nov 2017 11:09:43 -0600 Subject: fix FreeBSD build This is for #186. --- src/rc/supervise-daemon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/rc') diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index f3f51ff0..06d0bdb3 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -159,7 +159,7 @@ static void cleanup(void) free(changeuser); } -static void re_exec(void) +static void re_exec_supervisor(void) { syslog(LOG_WARNING, "Re-executing for %s", svcname); execlp("supervise-daemon", "supervise-daemon", svcname, "--reexec", @@ -180,7 +180,7 @@ static void handle_signal(int sig) /* Restore errno */ errno = serrno; if (! exiting) - re_exec(); + re_exec_supervisor(); } static char * expand_home(const char *home, const char *path) @@ -435,7 +435,9 @@ static void supervisor(char *exec, char **argv) signal_setup_restart(SIGUSR1, handle_signal); signal_setup_restart(SIGUSR2, handle_signal); signal_setup_restart(SIGBUS, handle_signal); +#ifdef SIGPOLL signal_setup_restart(SIGPOLL, handle_signal); +#endif signal_setup_restart(SIGPROF, handle_signal); signal_setup_restart(SIGSYS, handle_signal); signal_setup_restart(SIGTRAP, handle_signal); @@ -446,7 +448,9 @@ static void supervisor(char *exec, char **argv) signal_setup_restart(SIGEMT, handle_signal); #endif signal_setup_restart(SIGIO, handle_signal); +#ifdef SIGPWR signal_setup_restart(SIGPWR, handle_signal); +#endif #ifdef SIGUNUSED signal_setup_restart(SIGUNUSED, handle_signal); #endif -- cgit v1.2.3