diff options
| author | herbelin | 2005-02-04 22:50:51 +0000 |
|---|---|---|
| committer | herbelin | 2005-02-04 22:50:51 +0000 |
| commit | 6ed4f78cdb661e9d7509913f142275e384122d48 (patch) | |
| tree | 3d97711237339e384520ebb14263d90ce023a90e | |
| parent | b2449bc289f543290f811a9afb19faee62f7fca6 (diff) | |
Bug synchronisation fonction connect
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@6685 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | lib/system.ml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/system.ml b/lib/system.ml index 237c9848fd..241477e8c4 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -196,18 +196,16 @@ let connect writefun readfun com = with Sys_error s -> close_out ch_to_out; close_in ch_to_in; error ("Cannot set connection from "^com^"("^s^")") in + writefun ch_to_out; + close_out ch_to_out; let pid = let ch_to' = Unix.descr_of_in_channel ch_to_in in let ch_from' = Unix.descr_of_out_channel ch_from_out in try Unix.create_process com [||] ch_to' ch_from' Unix.stdout with Unix.Unix_error (err,_,_) -> - close_in ch_to_in; - close_out ch_to_out; - close_in ch_from_in; - close_out ch_from_out; + close_in ch_to_in; close_in ch_from_in; close_out ch_from_out; + unlink tmp_from; unlink tmp_to; error ("Cannot execute "^com^"("^(Unix.error_message err)^")") in - writefun ch_to_out; - close_out ch_to_out; close_in ch_to_in; close_out ch_from_out; (match snd (Unix.waitpid [] pid) with |
