-
-(** Open fifos for a session. SHOULD NOt shutdown vsys if the fifos don't exist *)
-let openentry_in root_dir fqp_in backend_spec =
- Dirwatcher.mask_watch root_dir;
- let fd_in = openentry_int fqp_in in
- Dirwatcher.unmask_watch root_dir [S_Open];
- let (fqp,slice_name) = backend_spec in
- Hashtbl.replace direct_fifo_table fqp_in (Some(root_dir,fqp,slice_name,fd_in))
+(** Open entry safely, by first masking out the file to be opened *)
+let openentry_safe root_dir fqp_in backend_spec =
+ Dirwatcher.mask_watch fqp_in;
+ let fd_in = openentry_safet fqp_in in
+ Dirwatcher.unmask_watch fqp_in;
+ let (fqp,slice_name) = backend_spec in
+ Hashtbl.replace direct_fifo_table fqp_in (Some(root_dir,fqp,slice_name,fd_in))