Skip to content

process::exec: using appropriate exit code on vxworks.#158549

Open
devnexen wants to merge 3 commits into
rust-lang:mainfrom
devnexen:vxworks_exit_status_fix
Open

process::exec: using appropriate exit code on vxworks.#158549
devnexen wants to merge 3 commits into
rust-lang:mainfrom
devnexen:vxworks_exit_status_fix

Conversation

@devnexen

Copy link
Copy Markdown
Contributor

No description provided.

@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 Jun 29, 2026
@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

r? @clarfonthey

rustbot has assigned @clarfonthey.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

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

@bjorn3

bjorn3 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Should this also forward signals? You can use raise() + first unregistering any signal handler that may already exist.

@clarfonthey

Copy link
Copy Markdown
Contributor

cc @biabbas @hax0kartik as the vxworks maintainers. Agree that this should probably forward signals.

@clarfonthey

Copy link
Copy Markdown
Contributor

r=me with the new changes, assuming they work on vxworks. Would prefer to wait for at least someone to verify that (doesn't have to be one of the maintainers I pinged) before merging, but if there aren't any objections for a few days, I'll probably just merge anyway.

if libc::WIFSIGNALED(status) {
let signal = libc::WTERMSIG(status);
libc::signal(signal, libc::SIG_DFL);
libc::raise(signal);

@bjorn3 bjorn3 Jun 29, 2026

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.

Maybe put an abort right after the raise? Also I think I was wrong with raise, rather kill(getpid(), signal) should be used. raise sends the signal to the current thread rather than the entire process. Maybe unmasking the signal also makes sense, though sudo at least doesn't do this: https://github.com/sudo-project/sudo/blob/d3698715833c24d7e8a27b3685f6cba1d9d38899/src/sudo.c#L318-L325

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Also fine handing off review to you on this one if you'd like to take over. I don't mind doing it either, just, wanted to be clear I'm fine with you handling it if you want.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants