open
Unix
let
mon_write
desc
buf
offset
len
=
let
rec
write
offset
left
=
if
len
> 0
then
let
n
=
single_write
desc
buf
offset
left
in
write
(
offset
+
n
) (
left
-
n
)
else
len
in
write
offset
len
;;