- let purestr = asciiz(str) in
- let (dirname,handler,oneshot) =
- try Hashtbl.find wdmap wd with Not_found->("",None,false)
- in
- List.iter (fun l->printf "%s " (string_of_event l)) evlist;
- printf "\n";flush Pervasives.stdout;
- if (oneshot) then Hashtbl.remove wdmap wd;
- (
- match handler with
- | None->fprintf logfd "Unhandled watch descriptor\n";flush logfd
- | Some(handler)->handler wd dirname evlist purestr
- )
+ begin
+ let purestr = asciiz(str) in
+ let (dirname,handler) =
+ try Hashtbl.find wdmap wd with Not_found->("",None)
+ in
+ match handler with
+ | None->fprintf logfd "Unhandled watch descriptor\n";flush logfd
+ | Some(handler)->handler wd dirname evlist purestr
+ end