diff options
-rw-r--r-- | src/jobs.c | 2 | ||||
-rw-r--r-- | src/jobs.h | 2 | ||||
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/sig-monitor.c | 3 |
4 files changed, 8 insertions, 6 deletions
@@ -689,7 +689,7 @@ struct sd_event *jobs_get_sd_event() * @param start The start routine to activate (can't be NULL) * @return 0 in case of success or -1 in case of error. */ -int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)()) +int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum)) { int rc, launched; struct thread me; @@ -44,5 +44,5 @@ extern struct sd_event *jobs_get_sd_event(); extern void jobs_terminate(); -extern int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)()); +extern int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum)); @@ -529,10 +529,15 @@ static void run_startup_calls() | job for starting the daemon +--------------------------------------------------------- */ -static void start() +static void start(int signum) { struct afb_hsrv *hsrv; + if (signum) { + ERROR("start aborted: received signal %s", strsignal(signum)); + exit(1); + } + // ------------------ sanity check ---------------------------------------- if (config->httpdPort <= 0) { ERROR("no port is defined"); diff --git a/src/sig-monitor.c b/src/sig-monitor.c index ce0a4cd0..aaffaed0 100644 --- a/src/sig-monitor.c +++ b/src/sig-monitor.c @@ -187,6 +187,3 @@ void sig_monitor(int timeout, void (*function)(int sig, void*), void *arg) } - - - |