let
buffer_size
= 4096
let
buffer
=
String
.
create
buffer_size
let
rec
copy_data
fd_in
fd_out
=
match
Unix
.
read
fd_in
buffer
0
buffer_size
with
0 -> ()
|
r
->
ignore
(
Unix
.
write
fd_out
buffer
0
r
);
copy_data
fd_in
fd_out
;;