#include <sys/wait.h>
#include <systemd/sd-event.h>
+#include <systemd/sd-daemon.h>
+
+#include <afb/afb-binding.h>
#include "afb-config.h"
#include "afb-hswitch.h"
#include "verbose.h"
#include "afb-common.h"
#include "afb-hook.h"
-
-#include <afb/afb-binding.h>
+#include "sd-fds.h"
/*
if SELF_PGROUP == 0 the launched command is the group leader
LOGAUTH("afb-daemon");
+ sd_fds_init();
+
// ------------- Build session handler & init config -------
config = afb_config_parse_arguments(argc, argv);
atexit(exit_handler);
// infinite loop
eventloop = afb_common_get_event_loop();
+ sd_notify(1, "READY=1");
for (;;)
sd_event_run(eventloop, 30000000);