Repository navigation
[0.2] Backports - #5588
Merged
Merged
[0.2] Backports#5588
Conversation
(backport <rust-lang#5542>) (cherry picked from commit ac187e7)
The upstream issue has been resolved. This reverts commit 8824255. (backport <rust-lang#5582>) (cherry picked from commit 4c2c5f7)
[ already had `#[exhaustive]` on 0.2, just make the comment match - Trevor ] (backport <rust-lang#5582>) (cherry picked from commit 6e921ea)
These flags are passed to `posix_spawnattr_setflags`, which takes a `short` in newlib's `spawn.h` and is already bound with `c_short` here. Every other platform uses `c_short` for them. Linux was changed in rust-lang#3629, and Cygwin support was added after that with `c_int`. The values are unchanged. Link: https://github.com/cygwin/cygwin/blob/6fde14c0e24aa7e6dd73ba96b8ec60962261e2d5/newlib/libc/include/spawn.h#L42-L47 Link: https://github.com/cygwin/cygwin/blob/6fde14c0e24aa7e6dd73ba96b8ec60962261e2d5/newlib/libc/include/spawn.h#L92-L93 Link: https://github.com/cygwin/cygwin/blob/6fde14c0e24aa7e6dd73ba96b8ec60962261e2d5/newlib/libc/include/spawn.h#L105 (backport <rust-lang#5572>) (cherry picked from commit 8cc9013)
On Linux these recently gained a new field, which is technically breaking. Smooth this over a bit by switching to `s2` to get `Default` implemented. (backport <rust-lang#5583>) (cherry picked from commit 40422af)
Add the chdir file actions on macOS: the `_np` versions, available since macOS 10.15, and the POSIX.1-2024 names, available since macOS 26.0. On the other Apple platforms they are only SPI. Sources: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/libsyscall/wrappers/spawn/spawn.h#L72-L76 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/libsyscall/wrappers/spawn/spawn.h#L182-L186 Part of rust-lang#3958 (backport <rust-lang#5558>) (cherry picked from commit 9e01c7f)
`INHERIT_ZERO` is a FreeBSD addition to `minherit(2)` (2017) that DragonFly has never picked up. It is absent from DragonFly's `<sys/mman.h>` on current master and on the 6.0, 6.2 and 6.4 releases. Move it next to the other FreeBSD-only `<sys/mman.h>` constants and drop it from the DragonFly semver baseline. Link: https://github.com/freebsd/freebsd-src/blob/a68d11d310dd5100a18f187c1108df6703315989/sys/sys/mman.h#L42-L45 Link: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/d1f4fb943c73e2b61ddabff6aa48ce7551db72f4/sys/sys/mman.h#L58-L60 Link: freebsd/freebsd-src@78d7964 (backport <rust-lang#5587>) (cherry picked from commit e08cc43)
Collaborator
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport the following:
posix_spawn_file_actions_add(f)chdir(_np)#5558POSIX_SPAWN_*flags toc_short#5572Defaultimpl #5583INHERIT_ZEROto the freebsd module #5587