summaryrefslogtreecommitdiff
path: root/scripts/coqc.ml
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2011-04-19 16:47:51 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2011-04-19 16:47:51 +0200
commitaa33547c764a229e22d323ca213d46ea221b903e (patch)
tree3894cb190f34bc1d2deee4322a674db641562ee0 /scripts/coqc.ml
parent50dc9067e98ca001ad2e875011abab5da6fdb621 (diff)
parent9d27ae09786866b6e3d7b79d1fa7667e5e2aa309 (diff)
Remove non-DFSG contentsupstream/8.3.pl2+dfsg
Diffstat (limited to 'scripts/coqc.ml')
-rw-r--r--scripts/coqc.ml10
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 ()