- /* install trace of requests */
- if (config->tracereq)
- afb_hook_req_create(NULL, NULL, NULL, config->tracereq, NULL, NULL);
-
- /* start the services */
- if (afb_apis_start_all_services(1) < 0)
- exit(1);
-
- /* start the HTTP server */
- if (!config->noHttpd) {
- hsrv = start_http_server();
- if (hsrv == NULL)
- exit(1);
- }
-
- /* run the command */
- if (execute_command() < 0)
- exit(1);
-
- /* records the loop */
- if (jobs_add_event_loop(NULL, 0, main_evloop, afb_common_get_event_loop()) < 0) {
- ERROR("failed to set main_evloop");
- return 1;
- }
-
- /* ready */
- sd_notify(1, "READY=1");
-
- /* turn as processing thread */
- jobs_add_me();
- WARNING("hoops returned from jobs_add_me! [report bug]");
- return 0;
+ /* enter job processing */
+ jobs_start(3, 0, 50, start);
+ WARNING("hoops returned from jobs_enter! [report bug]");
+ return 1;