rust: library: Add setsid
method to CommandExt
trait by HarveyHunt · Pull Request #105377 · rust-lang/rust (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Add a setsid method to the CommandExt trait so that callers can create a process in a new session and process group whilst still using the POSIX spawn fast path.
Tracking issue: #105376
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.
Please see the contribution instructions for more information.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the library team, which will review and decide on the PR/issue.
labels
Hey! It looks like you've submitted a new PR for the library teams!
If this PR contains changes to any rust-lang/rust
public library APIs then please comment with @rustbot label +T-libs-api -T-libs
to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.
Examples of T-libs-api
changes:
- Stabilizing library features
- Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
- Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
- Changing public documentation in ways that create new stability guarantees
- Changing observable runtime behavior of library APIs
rustbot added T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
and removed T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
This comment has been minimized.
The CI failures are caused by using libc
version 0.2.137
. I added the POSIX_SPAWN_SETSID
flag in this PR, which is only available in v 0.2.138
.
Is there another cargo file I need to update?
rustbot added T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Area: Issues & PRs about the rust-lang/rust repository itself
Area: The testsuite used to check the correctness of rustc
Relevant to the infrastructure team, which will review and decide on the PR/issue.
labels
Some changes occurred in HTML/CSS/JS.
cc @GuillaumeGomez, @Folyd, @jsha
The Miri subtree was changed
cc @rust-lang/miri
Some changes occurred in const_evaluatable.rs
cc @BoxyUwU
I've updated a couple of Cargo.lock
files that still had libc
0.2.137
specified, hopefully that's enough to get the CI working.
Sorry for the noise generated by rustbot, I accidentally included some commits from master
in my force push.
This comment has been minimized.
Add a setsid method to the CommandExt trait so that callers can create a process in a new session and process group whilst still using the POSIX spawn fast path.
Tracking issue: rust-lang#105376
I've rebased and removed the commit I had to bump libc, as an upstream commit bumped the libc version for me. :)
@m-ou-se, would you be able to take a look please?
rustbot removed the T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
label
I believe this requires on ACP (adding a new unstable API).
Please create one, if you haven't already. Then link it here and mark the PR as S-waiting-on-ACP.
@rustbot label -S-waiting-on-review -A-meta -A-testsuite -T-infra +S-waiting-on-author
rustbot added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Area: Issues & PRs about the rust-lang/rust repository itself
Area: The testsuite used to check the correctness of rustc
labels
Relevant to the infrastructure team, which will review and decide on the PR/issue.
label
Hey @pitaj, I'll create an ACP and then update this PR with the tags once that's done
@rustbot label +S-waiting-on-acp -S-waiting-on-author
rustbot added S-waiting-on-ACP
Status: PR has an ACP and is waiting for the ACP to complete.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
bors added the S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
label
rustbot added the S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
label
@@ -179,6 +179,9 @@ pub trait CommandExt: Sealed { |
---|
/// ``` |
#[stable(feature = "process_set_process_group", since = "1.64.0")] |
fn process_group(&mut self, pgroup: i32) -> &mut process::Command; |
#[unstable(feature = "process_setsid", issue = "105376")] |
fn setsid(&mut self) -> &mut process::Command; |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the fn setsid(&mut self, setsid: bool) -> &mut Command
signature might be preferable - this is what we have for create_pidfd
force_quotes
and async_pipes
.
@HarveyHunt
Thanks for your contribution
From wg-triage. Could you please take a look comment above and rebase
Dylan-DPC added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
Status: PR has an ACP and is waiting for the ACP to complete.
labels
@HarveyHunt
Thanks for the PR.
From wg-triage. Could you please take a look above and rebase? Thanks.
Labels
Area: `std::process` and `std::env`
Status: This is awaiting some action (such as code changes or more information) from the author.
Relevant to the library API team, which will review and decide on the PR/issue.