diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/coqc.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/coqc.ml b/scripts/coqc.ml index 57453ac4d7..be20de24ab 100644 --- a/scripts/coqc.ml +++ b/scripts/coqc.ml @@ -82,7 +82,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 @@ -192,4 +196,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 () |
