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 }})

HarveyHunt

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

ACP: rust-lang/libs-team#184

@rustbot

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 rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Dec 6, 2022

@rustbot

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:

@HarveyHunt

@rustbot 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

Dec 6, 2022

@rust-log-analyzer

This comment has been minimized.

@HarveyHunt

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 rustbot added T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

A-meta

Area: Issues & PRs about the rust-lang/rust repository itself

A-testsuite

Area: The testsuite used to check the correctness of rustc

T-infra

Relevant to the infrastructure team, which will review and decide on the PR/issue.

labels

Dec 7, 2022

@rustbot

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

@HarveyHunt

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.

@rust-log-analyzer

This comment has been minimized.

@bors

@HarveyHunt

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

@HarveyHunt

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 rustbot removed the T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

label

Jan 18, 2023

@pitaj

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 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.

A-meta

Area: Issues & PRs about the rust-lang/rust repository itself

A-testsuite

Area: The testsuite used to check the correctness of rustc

labels

Jan 29, 2023

@rustbot rustbot removed the T-infra

Relevant to the infrastructure team, which will review and decide on the PR/issue.

label

Jan 29, 2023

@HarveyHunt

Hey @pitaj, I'll create an ACP and then update this PR with the tags once that's done

@HarveyHunt

@pitaj

@rustbot label +S-waiting-on-acp -S-waiting-on-author

@rustbot 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

Feb 27, 2023

@bors

@bors bors added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Jan 13, 2024

@tgross35

@rustbot rustbot added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Dec 20, 2024

tgross35

@@ -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.

@alex-semenyuk

@HarveyHunt
Thanks for your contribution
From wg-triage. Could you please take a look comment above and rebase

@Dylan-DPC 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.

S-waiting-on-ACP

Status: PR has an ACP and is waiting for the ACP to complete.

labels

Jan 26, 2025

@LFS6502

@HarveyHunt
Thanks for the PR.
From wg-triage. Could you please take a look above and rebase? Thanks.

Labels

A-process

Area: `std::process` and `std::env`

S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

T-libs-api

Relevant to the library API team, which will review and decide on the PR/issue.