summaryrefslogtreecommitdiff
path: root/utils/ccomp.ml
diff options
context:
space:
mode:
authorThomas Refis <thomas.refis@gmail.com>2018-04-16 16:58:11 +0100
committerThomas Refis <refis.thomas@gmail.com>2018-05-05 09:09:32 -0400
commit6d4b966354f115c2eb7a7f8bd2f6c53221793fad (patch)
tree86737aa2c74a1bc4361f75b26ad62a7faec83ae4 /utils/ccomp.ml
parent9b10a776ee62b6e5d05bd32013db1db1fdaa2383 (diff)
downloadocaml-6d4b966354f115c2eb7a7f8bd2f6c53221793fad.tar.gz
Ccomp.command: raise Sys_error on exit code 127
Diffstat (limited to 'utils/ccomp.ml')
-rw-r--r--utils/ccomp.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/ccomp.ml b/utils/ccomp.ml
index 3f186b3bb0..f3482a900b 100644
--- a/utils/ccomp.ml
+++ b/utils/ccomp.ml
@@ -21,7 +21,9 @@ let command cmdline =
prerr_string cmdline;
prerr_newline()
end;
- Sys.command cmdline
+ let res = Sys.command cmdline in
+ if res = 127 then raise (Sys_error cmdline);
+ res
let run_command cmdline = ignore(command cmdline)