# HG changeset patch # User Jonathan Ludlam # Date 1266595802 0 # Node ID 7f019b5653d9170ac3cea6d0ab428d2349ed4ef9 # Parent b4e933bc9df054df1d544e25430a8581bc1518ea CA-37583: Make sure that the error code from the host-restore script is propagated via the API. Signed-off-by: Jon Ludlam diff -r b4e933bc9df0 -r 7f019b5653d9 ocaml/xapi/xapi_host_backup.ml --- a/ocaml/xapi/xapi_host_backup.ml Fri Feb 19 16:10:02 2010 +0000 +++ b/ocaml/xapi/xapi_host_backup.ml Fri Feb 19 16:10:02 2010 +0000 @@ -123,7 +123,7 @@ ) (fun () -> close in_pipe; - waitpid pid + waitpid_fail_if_bad_exit pid ) ) in diff -r b4e933bc9df0 -r 7f019b5653d9 ocaml/xapi/xapi_support.ml --- a/ocaml/xapi/xapi_support.ml Fri Feb 19 16:10:02 2010 +0000 +++ b/ocaml/xapi/xapi_support.ml Fri Feb 19 16:10:02 2010 +0000 @@ -34,7 +34,7 @@ match with_logfile_fd label (fun log_fd -> let pid = safe_close_and_exec None (Some log_fd) (Some log_fd) [] upload_wrapper [file; url; proxy] in - waitpid pid) with + waitpid_fail_if_bad_exit pid) with | Success _ -> debug "Upload succeeded" | Failure (log, exn) -> debug "Upload failed, output: %s" log;