diff options
author | Stephane Glondu <steph@glondu.net> | 2011-04-19 16:52:57 +0200 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2011-04-19 16:52:57 +0200 |
commit | 7a24ebd7506f927a6493d065b8c9c297afd08db3 (patch) | |
tree | 3ee6d9c9aa5fc6cf6f793c1fb1a37c2307fd0287 /scripts/coqc.ml | |
parent | 4b1c150e26881501db9aa944df6406150fc0670d (diff) | |
parent | aa33547c764a229e22d323ca213d46ea221b903e (diff) |
Merge commit 'upstream/8.3.pl2+dfsg'
Diffstat (limited to 'scripts/coqc.ml')
-rw-r--r-- | scripts/coqc.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/coqc.ml b/scripts/coqc.ml index 7185b140..cc8e5a1a 100644 --- a/scripts/coqc.ml +++ b/scripts/coqc.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coqc.ml 13323 2010-07-24 15:57:30Z herbelin $ *) +(* $Id: coqc.ml 14015 2011-04-15 17:48:45Z letouzey $ *) (* Afin de rendre Coq plus portable, ce programme Caml remplace le script coqc. @@ -84,7 +84,11 @@ let compile command args files = Unix.create_process_env command (Array.of_list args') environment Unix.stdin Unix.stdout Unix.stderr in - ignore (Unix.waitpid [] pid) + let status = snd (Unix.waitpid [] pid) in + let errcode = + match status with Unix.WEXITED c|Unix.WSTOPPED c|Unix.WSIGNALED c -> c + in + exit errcode | _ -> Unix.execvpe command (Array.of_list args') environment @@ -196,4 +200,4 @@ let main () = (* List.iter (compile coqtopname args) cfiles*) Unix.handle_unix_error (compile coqtopname args) cfiles -let _ = Printexc.print main (); exit 0 +let _ = Printexc.print main () |