X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain-afb-daemon.c;h=721faf2fdfe571fb1ce1ef1a18694b43947f3ead;hb=fe9601cbf6bbebe9464bfbde2efd0ec278b3e243;hp=8be78af6490947e33b838b406d1fbcec50c1282d;hpb=75526aa1e85a8bacb50e917971010d06137a3610;p=src%2Fapp-framework-binder.git diff --git a/src/main-afb-daemon.c b/src/main-afb-daemon.c index 8be78af6..721faf2f 100644 --- a/src/main-afb-daemon.c +++ b/src/main-afb-daemon.c @@ -64,7 +64,7 @@ if SELF_PGROUP == 0 the launched command is the group leader if SELF_PGROUP != 0 afb-daemon is the group leader */ -#define SELF_PGROUP 1 +#define SELF_PGROUP 0 struct afb_apiset *main_apiset; struct afb_config *main_config; @@ -580,7 +580,7 @@ static void start(int signum, void *arg) goto error; } #if defined(WITH_SUPERVISION) - if (afb_supervision_init() < 0) { + if (afb_supervision_init(main_apiset, main_config) < 0) { ERROR("failed to setup supervision"); goto error; } @@ -599,18 +599,15 @@ static void start(int signum, void *arg) /* load bindings */ afb_debug("start-load"); apiset_start_list(main_config->so_bindings, afb_api_so_add_binding, "the binding"); -#if defined(WITH_DBUS_TRANSPARENCY) - apiset_start_list(main_config->dbus_clients, afb_api_dbus_add_client, "the afb-dbus client"); -#endif - apiset_start_list(main_config->ws_clients, afb_api_ws_add_client_weak, "the afb-websocket client"); apiset_start_list(main_config->ldpaths, afb_api_so_add_pathset_fails, "the binding path set"); apiset_start_list(main_config->weak_ldpaths, afb_api_so_add_pathset_nofails, "the weak binding path set"); apiset_start_list(main_config->auto_api, afb_autoset_add_any, "the automatic api path set"); - + apiset_start_list(main_config->ws_servers, afb_api_ws_add_server, "the afb-websocket service"); #if defined(WITH_DBUS_TRANSPARENCY) apiset_start_list(main_config->dbus_servers, afb_api_dbus_add_server, "the afb-dbus service"); + apiset_start_list(main_config->dbus_clients, afb_api_dbus_add_client, "the afb-dbus client"); #endif - apiset_start_list(main_config->ws_servers, afb_api_ws_add_server, "the afb-websocket service"); + apiset_start_list(main_config->ws_clients, afb_api_ws_add_client_weak, "the afb-websocket client"); DEBUG("Init config done"); @@ -619,7 +616,7 @@ static void start(int signum, void *arg) #if !defined(NO_CALL_PERSONALITY) personality((unsigned long)-1L); #endif - if (afb_apiset_start_all_services(main_apiset, 1) < 0) + if (afb_apiset_start_all_services(main_apiset) < 0) goto error; /* start the HTTP server */ @@ -665,9 +662,6 @@ int main(int argc, char *argv[]) { afb_debug("main-entry"); - // let's run this program with a low priority - nice(20); - // ------------- Build session handler & init config ------- main_config = afb_config_parse_arguments(argc, argv); if (main_config->name) {