Simplify starting of services
[src/app-framework-binder.git] / src / main-afb-daemon.c
index 8be78af..ce681e3 100644 (file)
@@ -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;
        }
@@ -619,7 +619,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 +665,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) {