Add hooking for events
[src/app-framework-binder.git] / src / main.c
index f5512a2..fc1ec13 100644 (file)
@@ -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)
@@ -574,6 +573,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");