search for: do_check_exitcode

Displaying 4 results from an estimated 4 matches for "do_check_exitcode".

2019 Jan 16
0
[PATCH 1/5] mltools: split helper do_check_exitcode
...1554c5a 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -427,7 +427,9 @@ and do_run ?(echo_cmd = true) ?stdout_fd ?stderr_fd args = and do_teardown app outfd errfd exitstat = Option.may Unix.close outfd; Option.may Unix.close errfd; - match exitstat with + do_check_exitcode app exitstat + +and do_check_exitcode app = function | Unix.WEXITED i -> i | Unix.WSIGNALED i -> -- 2.20.1
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
...to allow to better handle downloading failures, and handle the failures gracefully in virt-builder. RFC because I'm not yet too convinced the approach I used (especially for the changes in the Curl module) is optimal, so looking for feedback on this. Pino Toscano (5): mltools: split helper do_check_exitcode mltools: create a new external_command_code mltools: add simple tests for external_command mltools: curl: turn Curl.run to raise exceptions builder: ignore repositories with download failures builder/builder.ml | 39 ++++++++++++++++++++--------- common/mltools/curl.ml...
2019 Jan 16
0
[PATCH 2/5] mltools: create a new external_command_code
...quot;external command ‘%s’ exited with error %d") cmd i - | Unix.WSIGNALED i -> - error (f_"external command ‘%s’ killed by signal %d") cmd i - | Unix.WSTOPPED i -> - error (f_"external command ‘%s’ stopped by signal %d") cmd i - ); - lines + let exitcode = do_check_exitcode cmd stat in + lines, exitcode -let rec run_commands ?(echo_cmd = true) cmds = +and run_commands ?(echo_cmd = true) cmds = let res = Array.make (List.length cmds) 0 in let pids = List.mapi ( diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli index ab70f583e..f...
2019 Jan 16
2
Re: [PATCH 2/5] mltools: create a new external_command_code
...ith error %d") cmd i > - | Unix.WSIGNALED i -> > - error (f_"external command ‘%s’ killed by signal %d") cmd i > - | Unix.WSTOPPED i -> > - error (f_"external command ‘%s’ stopped by signal %d") cmd i > - ); > - lines > + let exitcode = do_check_exitcode cmd stat in > + lines, exitcode > > -let rec run_commands ?(echo_cmd = true) cmds = > +and run_commands ?(echo_cmd = true) cmds = > let res = Array.make (List.length cmds) 0 in > let pids = > List.mapi ( > diff --git a/common/mltools/tools_utils.mli b/common/ml...