-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-muslTarget: The musl libcTarget: The musl libc
Description
I tried this code:
use std::process::Command;
let mut cmd = Command::new("ls");
cmd.current_dir(".");
cmd.output().unwrap();
(compiled under x86_64-unknown-linux-musl)
I expected to see this happen:
The posix_spawn
fast path is used.
Instead, this happened:
Rust fell back to the fork/exec slow path. (Inspected this using gdb and strace).
This is presumably because
rust/library/std/src/sys/unix/process/process_unix.rs
Lines 442 to 447 in 6dbae3a
weak! { | |
fn posix_spawn_file_actions_addchdir_np( | |
*mut libc::posix_spawn_file_actions_t, | |
*const libc::c_char | |
) -> libc::c_int | |
} |
Meta
rustc --version --verbose
:
rustc 1.64.0-nightly (93ffde6f0 2022-07-23)
binary: rustc
commit-hash: 93ffde6f04d3d24327a4e17a2a2bf4f63c246235
commit-date: 2022-07-23
host: x86_64-unknown-linux-gnu
release: 1.64.0-nightly
LLVM version: 14.0.6
Backtrace
<backtrace>
konstin
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-muslTarget: The musl libcTarget: The musl libc