Skip to content

std: make send_process_group_signal unsupported on VxWorks#159991

Open
physwkim wants to merge 1 commit into
rust-lang:mainfrom
physwkim:vxworks-process-group-unsupported
Open

std: make send_process_group_signal unsupported on VxWorks#159991
physwkim wants to merge 1 commit into
rust-lang:mainfrom
physwkim:vxworks-process-group-unsupported

Conversation

@physwkim

@physwkim physwkim commented Jul 27, 2026

Copy link
Copy Markdown

x86_64-wrs-vxworks doesn't build std: cargo new plus -Zbuild-std stops
with E0425 on libc::killpg, which #156539 introduced.

libc has never declared killpg for vxworks, and declaring it wouldn't help.
On wrsdk-vxworks7-qemu-1.17.0 there's no killpg in the headers, the sysroot
archives or the prebuilt kernel, and getpgrp/setpgid are no-ops in libunix:
getpgrp returns a constant 0, setpgid stores nothing. That rules out
kill(-pgrp, sig) too. Command::process_group is already ignored on this
target, since get_pgroup is only read by the fork/posix_spawn path while
vxworks spawns through rtpSpawn.

Closes #159969.

@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 Jul 27, 2026
@rustbot

rustbot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @Darksonn (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

@rustbot

This comment has been minimized.

@physwkim
physwkim force-pushed the vxworks-process-group-unsupported branch from 91cad5f to 4ea0ccf Compare July 27, 2026 04:51

@Darksonn Darksonn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +174 to +175
pub fn send_process_group_signal(&self, _signal: i32) -> io::Result<()> {
Err(io::const_error!(ErrorKind::Unsupported, "process groups not supported by vxworks"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns an error, but the other platform where this is unsupported panics:

pub fn send_process_group_signal(&self, _signal: i32) -> io::Result<()> {
// Fuchsia doesn't have a direct equivalent for signals
unimplemented!()
}

Let's be consistent.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review — switched to unimplemented!() to match fuchsia.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 27, 2026
@rustbot

rustbot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@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 Jul 27, 2026
VxWorks has no process groups: the SDK defines no `killpg`, and
`getpgrp`/`setpgid` are no-ops in libunix, so `kill(-pgrp, sig)` is no
substitute either. libc cannot usefully declare `killpg` for this
target, so calling it leaves the target unable to build std. Panic
instead, matching what fuchsia does for the same method.
@physwkim
physwkim force-pushed the vxworks-process-group-unsupported branch from 4ea0ccf to c707fad Compare July 27, 2026 08:54
@physwkim

Copy link
Copy Markdown
Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 27, 2026

@Darksonn Darksonn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c707fad has been approved by Darksonn

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

Reason for tree closure: spurious failures

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 27, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 27, 2026
…upported, r=Darksonn

std: make send_process_group_signal unsupported on VxWorks

`x86_64-wrs-vxworks` doesn't build std: `cargo new` plus `-Zbuild-std` stops
with E0425 on `libc::killpg`, which rust-lang#156539 introduced.

libc has never declared `killpg` for vxworks, and declaring it wouldn't help.
On wrsdk-vxworks7-qemu-1.17.0 there's no `killpg` in the headers, the sysroot
archives or the prebuilt kernel, and `getpgrp`/`setpgid` are no-ops in libunix:
`getpgrp` returns a constant 0, `setpgid` stores nothing. That rules out
`kill(-pgrp, sig)` too. `Command::process_group` is already ignored on this
target, since `get_pgroup` is only read by the fork/posix_spawn path while
vxworks spawns through `rtpSpawn`.

Closes rust-lang#159969.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 27, 2026
…upported, r=Darksonn

std: make send_process_group_signal unsupported on VxWorks

`x86_64-wrs-vxworks` doesn't build std: `cargo new` plus `-Zbuild-std` stops
with E0425 on `libc::killpg`, which rust-lang#156539 introduced.

libc has never declared `killpg` for vxworks, and declaring it wouldn't help.
On wrsdk-vxworks7-qemu-1.17.0 there's no `killpg` in the headers, the sysroot
archives or the prebuilt kernel, and `getpgrp`/`setpgid` are no-ops in libunix:
`getpgrp` returns a constant 0, `setpgid` stores nothing. That rules out
`kill(-pgrp, sig)` too. `Command::process_group` is already ignored on this
target, since `get_pgroup` is only read by the fork/posix_spawn path while
vxworks spawns through `rtpSpawn`.

Closes rust-lang#159969.
rust-bors Bot pushed a commit that referenced this pull request Jul 27, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #158417 (Avoid ICE when cfg_eval recovers no item from derive input)
 - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`)
 - #159554 (feat: Update method signature of int_from_ascii)
 - #159637 (Some place analysis tweaks)
 - #159649 (Normalize region obligations before regionck)
 - #159961 (sanitize_standard_fds: Miri supports poll now)
 - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs)
 - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static)
 - #159804 (Expand docs for fs::metadata and fs::symlink_metadata)
 - #159821 (Update expect message using the recommended style in binary_heap module)
 - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver)
 - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`)
 - #159991 (std: make send_process_group_signal unsupported on VxWorks)
 - #159996 (Detect when a macro without exclamation mark uses square brackets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std calls libc::killpg on VxWorks, which neither libc nor the platform provides

3 participants