From: Ximin Luo Date: Mon, 27 Jul 2020 01:42:02 +0000 (+0100) Subject: [PATCH] rustbuild: fix bad usage of UNIX exec() in rustc wrapper X-Git-Tag: archive/raspbian/1.45.0+dfsg1-2+rpi1^2~28 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f4319bb90d8b7e111f920f1033c3376206d5f1fb;p=rustc.git [PATCH] rustbuild: fix bad usage of UNIX exec() in rustc wrapper exec never returns, it replaces the current process. so anything after it is unreachable. that's not how exec_cmd() is used in the surrounding code Gbp-Pq: Name u-fix-exec.patch --- diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 047957e225..a95e4e0363 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -220,13 +220,6 @@ fn main() { std::process::exit(code); } -#[cfg(unix)] -fn exec_cmd(cmd: &mut Command) -> io::Result { - use std::os::unix::process::CommandExt; - Err(cmd.exec()) -} - -#[cfg(not(unix))] fn exec_cmd(cmd: &mut Command) -> io::Result { cmd.status().map(|status| status.code().unwrap()) }