let do_or_fail s = wrap_deferred Lwt_io.(fun () -> Lwt_unix.system s) ~on_exn:(fun e -> `Shell (s, `Exn e)) >>= fun ret -> discriminate_process_status s ret