X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=6b89aef13e908fb0fa887b0a9602aa35b499768c;hb=d31bd193cb4eeb5dc4e383d610ef94a9855810b7;hp=f5512a2c5751b7415dea7c9d77523ef39b41d83f;hpb=bb5806063c450da26a38e1915f076723d00df260;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index f5512a2c..6b89aef1 100644 --- a/src/main.c +++ b/src/main.c @@ -113,7 +113,6 @@ static void exit_handler() killpg(0, SIGTERM); else if (childpid > 0) killpg(childpid, SIGTERM); - exit(0); } static void on_sigterm(int signum, siginfo_t *info, void *uctx) @@ -530,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"); @@ -574,6 +578,8 @@ static void start() afb_hook_create_ditf(NULL, config->traceditf, NULL, NULL); if (config->tracesvc) afb_hook_create_svc(NULL, config->tracesvc, NULL, NULL); + if (config->traceevt) + afb_hook_create_evt(NULL, config->traceevt, NULL, NULL); /* load bindings */ apiset_start_list(config->dbus_clients, afb_api_dbus_add_client, "the afb-dbus client");