open Unix
open Globals
open Directfifowatcher
+open Unixsocketwatcher
(** frontendhandler class: Methods to create and unlink pipes and directories
@param root_dir vsys directory inside a slice
let realperm = perm land (lnot 0o111) in
match rp with Relpath(rel) ->
let fqp = String.concat "/" [root_dir;rel] in
- let res = Directfifowatcher.mkentry fqp abspath realperm slice_name in
- begin
- match res with
- | Success ->
- Directfifowatcher.openentry root_dir fqp (abspath,slice_name)
- | _ ->
- logprint "Could not create entry %s" abspath
- end;
- if (is_fd_passer rel) then
+ if (this#is_fd_passer rel) then
let res = Unixsocketwatcher.mkentry fqp abspath realperm slice_name in
begin
match res with
| _ ->
logprint "Could not create entry %s" abspath
end
-
+ else
+ let res = Directfifowatcher.mkentry fqp abspath realperm slice_name in
+ begin
+ match res with
+ | Success ->
+ Directfifowatcher.openentry root_dir fqp (abspath,slice_name)
+ | _ ->
+ logprint "Could not create entry %s" abspath
+ end
+