X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=main.ml;h=58e13b6a0380eac4448c799904fca22e26fdb9a2;hb=800c304d9ace52d7aa3a1c3398ac043e021da985;hp=5ec2952cedcf273b04edec4dee1a8760c709571a;hpb=87c0dc3957634fe643267904d0cedfed80a03f68;p=vsys.git diff --git a/main.ml b/main.ml index 5ec2952..58e13b6 100644 --- a/main.ml +++ b/main.ml @@ -4,7 +4,6 @@ open Printf open Inotify open Backend open Frontend -open Fifowatcher open Conffile let input_file_list = ref [] @@ -18,7 +17,8 @@ let cmdspeclist = ("-conffile",Arg.Set_string(Globals.conffile), "Config 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;input_file_list:=(!cur_dir,!cur_slice)::!input_file_list)], "frontendN,slicenameN"); - ("-nochroot",Arg.Set(Globals.nochroot), "Run in non-chroot environment") + ("-nochroot",Arg.Set(Globals.nochroot), "Run in non-chroot environment"); + ("-failsafe",Arg.Set(Globals.failsafe), "Never crash. Be stupid, but never crash. Use at your own risk."); ] let cont = ref true @@ -44,14 +44,15 @@ let _ = end; Dirwatcher.initialize (); - Fifowatcher.initialize (); + Directfifowatcher.initialize (); + if (!Globals.conffile <> "") then begin let frontends = Conffile.read_frontends !Globals.conffile in input_file_list:=List.concat [!input_file_list;frontends] end; - let felst = List.map (fun lst->let (x,y)=lst in printf "Slice %s (%s)\n" x y;flush logfd;new frontendHandler lst) !input_file_list in + let felst = List.map (fun lst->let (x,y)=lst in fprintf logfd "Slice %s (%s)\n" x y;flush logfd;new frontendHandler lst) !input_file_list in let _ = new backendHandler !Globals.backend felst in Fdwatcher.start_watch () end