directfifowatcher.cmo conffile.cmo backend.cmo
main.cmx: inotify.cmi globals.cmx frontend.cmx fdwatcher.cmx dirwatcher.cmx \
directfifowatcher.cmx conffile.cmx backend.cmx
+unixsocketwatcher.cmo: globals.cmo fdwatcher.cmo
+unixsocketwatcher.cmx: globals.cmx fdwatcher.cmx
splice_stub.o: splice_stub.c
gcc -c -I /usr/lib/ocaml -I /usr/lib64/ocaml splice_stub.c -o splice_stub.o
-vsys: ocaml_inotify-0.4/inotify.cmxa globals.cmx fdwatcher.cmx conffile.cmx splice_stub.o splice.cmx dirwatcher.cmx fifowatcher.cmx frontend.cmx backend.cmx main.cmx docs
- ocamlopt -I ocaml_inotify-0.4 str.cmxa unix.cmxa inotify.cmxa globals.cmx fdwatcher.cmx dirwatcher.cmx splice.cmx splice_stub.o directfifowatcher.cmx frontend.cmx backend.cmx str.cmxa conffile.cmx main.cmx -o vsys
+vsys: ocaml_inotify-0.4/inotify.cmxa globals.cmx fdwatcher.cmx conffile.cmx splice_stub.o splice.cmx dirwatcher.cmx fifowatcher.cmx frontend.cmx unixsocketwatcher.cmx backend.cmx main.cmx docs
+ ocamlopt -I ocaml_inotify-0.4 str.cmxa unix.cmxa inotify.cmxa globals.cmx fdwatcher.cmx dirwatcher.cmx splice.cmx splice_stub.o directfifowatcher.cmx frontend.cmx unixsocketwatcher.cmx backend.cmx str.cmxa conffile.cmx main.cmx -o vsys
vsys.b: ocaml_inotify-0.4/inotify.cma inotify.cmi globals.ml fdwatcher.ml dirwatcher.ml directfifowatcher.ml frontend.ml backend.ml main.ml
ocamlc -g str.cma unix.cma ocaml_inotify-0.4/inotify.cma globals.cmo fdwatcher.cmo dirwatcher.cmo directfifowatcher.cmo frontend.cmo backend.cmo str.cma conffile.cmo main.cmo -o vsys.b
e->logprint "Error creating FIFO: %s->%s. May be something wrong at the frontend.\n" fqp exec_fqp;Failed
let receive_event (listening_socket_spec:fname_and_fd) (_:fname_and_fd) =
- (* Do we care about this file? *)
- try
let (_,listening_socket) = listening_socket_spec in
+ try
let (data_socket, addr) = accept listening_socket in
match addr with
| ADDR_UNIX(fname) ->
- let entry_info =
- try
- Hashtbl.find unix_socket_table fname
+ begin
+ let entry_info =
+ try
+ Hashtbl.find unix_socket_table fname
with _ -> None in
- match entry_info with
- begin
- | Some(_,execpath,slice_name,fd) ->
- begin
+ match entry_info with
+ | Some(execpath,slice_name,fd) ->
+ begin
- end
- | None -> ()
- end
- | _ -> logprint "Serious error! Got a non UNIX connection over a UNIX socket\n"
- with e-> logprint "Error connecting service %s\n" execpath
+ end
+ | None -> ()
+ end
+ | _ -> logprint "Serious error! Got a non UNIX connection over a UNIX socket\n"
+ with e-> logprint "Error accepting socket\n"
(** Close sockets that just got removed *)
let closeentry fqp =