+int main(int argc, char *argv[])
+{
+ // let's run this program with a low priority
+ nice(20);
+
+ LOGAUTH("afb-daemon");
+
+ sd_fds_init();
+
+ // ------------- Build session handler & init config -------
+ config = afb_config_parse_arguments(argc, argv);
+
+ // --------- run -----------
+ if (config->background) {
+ // --------- in background mode -----------
+ INFO("entering background mode");
+ daemonize();
+ } else {
+ // ---- in foreground mode --------------------
+ INFO("entering foreground mode");
+ }
+
+ /* handle groups */
+// atexit(exit_handler);
+
+ /* ignore any SIGPIPE */
+ signal(SIGPIPE, SIG_IGN);
+
+ /* enter job processing */
+ jobs_start(3, 0, 50, start);
+ WARNING("hoops returned from jobs_enter! [report bug]");
+ return 1;