Skip to content

add environ to unix - #5339

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
LusterSourav:add-environ-v4
Aug 4, 2026
Merged

add environ to unix#5339
tgross35 merged 1 commit into
rust-lang:mainfrom
LusterSourav:add-environ-v4

Conversation

@LusterSourav

@LusterSourav LusterSourav commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

see commit messages.

  • libc-test/semver/unix.txt updated
  • commit messages link to POSIX exec spec
  • not applicable (no placeholder values)
  • cargo test -p libc-test — 15 passed

Closes #2520

@rustbot label +stable-nominated

@rustbot rustbot added O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jul 29, 2026
Comment thread libc-test/build.rs
Comment thread libc-test/build.rs Outdated
@LusterSourav

Copy link
Copy Markdown
Contributor Author
image

@LusterSourav

Copy link
Copy Markdown
Contributor Author
image

@LusterSourav
LusterSourav requested a review from tgross35 July 29, 2026 21:32
@LusterSourav

Copy link
Copy Markdown
Contributor Author

@LusterSourav

Copy link
Copy Markdown
Contributor Author

@tgross35 tgross35 left a comment

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.

(updating status)

View changes since this review

@rustbot

rustbot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

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

@rustbot

This comment has been minimized.

@rustbot

rustbot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/libc.git main
    $ git push --force-with-lease
    

@LusterSourav
LusterSourav force-pushed the add-environ-v4 branch 2 times, most recently from 3bb2917 to ea35ffa Compare July 30, 2026 16:28
@LusterSourav

Copy link
Copy Markdown
Contributor Author

environ now linux-gnu only. glibc declares it in <unistd.h> behind _GNU_SOURCE. no ctest skips elsewhere. commit messages link to headers.

@LusterSourav

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot

This comment has been minimized.

@rustbot

rustbot commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/libc.git main
    $ git push --force-with-lease
    

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@tgross35 tgross35 left a comment

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.

May as well take this but please clean up the history - 15 commits is a lot for a four line diff :)

@rustbot author

View changes since this review

@LusterSourav
LusterSourav force-pushed the add-environ-v4 branch 2 times, most recently from 6d89228 to 4dbb2f5 Compare August 4, 2026 12:33
@rustbot

rustbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

`environ` is an array of pointers to the environment strings, declared
in <unistd.h> behind _GNU_SOURCE on glibc.

Ref: https://man7.org/linux/man-pages/man7/environ.7.html
@tgross35

tgross35 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Please always include a link to headers in the commit message, the manpage is fine too but it's the headers we check against. I've already seen https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/posix/unistd.h#L566 though so this is okay.

@tgross35
tgross35 added this pull request to the merge queue Aug 4, 2026
Merged via the queue into rust-lang:main with commit cc74750 Aug 4, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-gnu O-linux O-linux-like O-unix S-waiting-on-author stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "environ"

3 participants