You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Command::status method doesn't say when it will return an Err(...) #108213
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-processArea: `std::process` (note: `std::env` is A-env)T-libsRelevant to the library team, which will review and decide on the PR/issue.
ought to mention when they will exit with an Err(_). From a discussion in the community Discord:
"nils, supposedly one of the many: they will error when the command is not found
nils, supposedly one of the many: well
nils, supposedly one of the many: there are probably other conditions than "command not found"
nils, supposedly one of the many: just in general when it failed to spawn it
nils, supposedly one of the many: which can happen for all kinds of issues"
Maybe it should be a module level doc to avoid duplication.
EAGAIN The caller is operating under the SCHED_DEADLINE
scheduling policy and does not have the reset-on-fork flag
set. See [sched(7)](https://man7.org/linux/man-pages/man7/sched.7.html).
definitely don't seem like something we want to guarantee, but something like this seems ok:
Spawning a command returns an error if:
The command does not exist, or is not in the platform-specific PATH search list.
A platform-specific limit on memory, number of processes, or number of threads is reached.
A dynamic library required by the command could not be found.
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-processArea: `std::process` (note: `std::env` is A-env)T-libsRelevant to the library team, which will review and decide on the PR/issue.
Activity
jyn514 commentedon Feb 19, 2023
This is platform-specific so I don't think we should document it in detail. Here is the canonical list for linux: https://man7.org/linux/man-pages/man3/posix_spawn.3.html#ERRORS, which delegates to the fork and clone man pages: https://man7.org/linux/man-pages/man2/clone.2.html#ERRORS, https://man7.org/linux/man-pages/man2/fork.2.html#ERRORS. Things like
definitely don't seem like something we want to guarantee, but something like this seems ok:
Spawning a command returns an error if:
MarioIlRosso commentedon Nov 14, 2026
@rustbot claim
Rollup merge of rust-lang#165966 - MarioIlRosso:issue-108213-fix, r=m…
Unrolled build for #165966 in rollup 166082
Rollup merge of #165966 - MarioIlRosso:issue-108213-fix, r=maxdexh