From f4319bb90d8b7e111f920f1033c3376206d5f1fb Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Mon, 27 Jul 2020 02:42:02 +0100 Subject: [PATCH] [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 --- src/bootstrap/bin/rustc.rs | 7 ------- 1 file changed, 7 deletions(-) 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()) } -- 2.30.2