let succeed ?(bin="") argl =
exec ~bin argl
>>= fun (out, err, status) ->
let failure fmt =
Printf.ksprintf (fun s -> fail (`Process (`Exec (bin, argl), `Non_zero s)))
fmt in
begin match status with
| `Exited 0 -> return (out, err)
| code -> failure "%s" (Exit_code.to_string code)
end