fixed test to test what happens when we close a file descriptor on which another thread is blocked reading

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13675 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2013-05-15 09:31:58 +00:00
parent 1b54fa1d93
commit 9dda1aa675
2 changed files with 2 additions and 3 deletions

View File

@ -14,8 +14,7 @@ let main () =
let (rd, wr) = Unix.pipe() in
let t = Thread.create
(fun () ->
ignore (Unix.write wr "0123456789" 0 10);
Thread.delay 3.0;
Thread.delay 1.0;
print_endline "closing fd...";
Unix.close rd;
)

View File

@ -1,3 +1,3 @@
reading...
read returned
closing fd...
read returned