You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2715 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
If I compile (no difference between ocamlc and ocamlopt) and run the following
program, the file pre looks like expected, foo.txt, foo2.txt and pre2 are all
empty, and the call to Unix.close_process_out oc never returns. Adding flushes
to taste doesn't really change anything.
If I close oc2 before oc, everything works. This is at least counterintuitive.
let _ =
let oc = Unix.open_process_out "tee pre | sort -u > foo.txt"
and oc2 = Unix.open_process_out "tee pre2 | sort -u > foo2.txt"
in
prerr_endline "Before";
for i = 1 to 10 do
for j = 0 to 9 do
Printf.fprintf oc "Foo %d\n" j;
Printf.fprintf oc2 "Foo %d\n" j;
done
done;
prerr_endline "After";
ignore(Unix.close_process_out oc);
prerr_endline "Never reached";
ignore(Unix.close_process_out oc2);
prerr_endline "Never ever reached"
The text was updated successfully, but these errors were encountered:
Original bug ID: 2715
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Florian Hars
Version: 3.07+2
OS: Linux 2.6.6 / OpenBSD 3.5
Submission from: grisu.bik-gmbh.de (217.110.154.194)
If I compile (no difference between ocamlc and ocamlopt) and run the following
program, the file pre looks like expected, foo.txt, foo2.txt and pre2 are all
empty, and the call to Unix.close_process_out oc never returns. Adding flushes
to taste doesn't really change anything.
If I close oc2 before oc, everything works. This is at least counterintuitive.
let _ =
let oc = Unix.open_process_out "tee pre | sort -u > foo.txt"
and oc2 = Unix.open_process_out "tee pre2 | sort -u > foo2.txt"
in
prerr_endline "Before";
for i = 1 to 10 do
for j = 0 to 9 do
Printf.fprintf oc "Foo %d\n" j;
Printf.fprintf oc2 "Foo %d\n" j;
done
done;
prerr_endline "After";
ignore(Unix.close_process_out oc);
prerr_endline "Never reached";
ignore(Unix.close_process_out oc2);
prerr_endline "Never ever reached"
The text was updated successfully, but these errors were encountered: