1998-10-29 07:55:07 -08:00
|
|
|
let main () =
|
2001-06-25 01:04:00 -07:00
|
|
|
let (rd, wr) = Unix.pipe() in
|
1998-10-29 07:55:07 -08:00
|
|
|
Thread.create
|
|
|
|
(fun () ->
|
|
|
|
Thread.delay 3.0;
|
|
|
|
prerr_endline "closing fd...";
|
|
|
|
Unix.close rd)
|
|
|
|
();
|
|
|
|
let buf = String.create 10 in
|
|
|
|
prerr_endline "reading...";
|
2001-06-25 01:04:00 -07:00
|
|
|
Unix.read rd buf 0 10;
|
1998-10-29 07:55:07 -08:00
|
|
|
prerr_endline "read returned"
|
|
|
|
|
|
|
|
let _ = Unix.handle_unix_error main ()
|