[
("-daemon",Arg.Set(daemonize), "Daemonize");
("-conffile",Arg.Set_string(Globals.conffile), "Config file");
+ ("-logfile",Arg.Set_string(Globals.log_filepath), "Log file");
("-backend",Arg.Set_string(Globals.backend), "Backend directory");
("-frontend",Arg.Tuple[Arg.String(fun s->cur_dir:=s);
Arg.String(fun s->cur_slice:=s;
match entry_info with
| Some(execpath,slice_name,fd) ->
begin
-
-
-
+ let child = fork () in
+ if (child == 0) then
+ begin
+ (*Child*)
+ (* Close all fds except for the socket *)
+ execv execpath,[execpath];
+ logprint "Could not execve %s" execpath
+ end
end
| None -> ()
end