pkg/reexec: some cleaning up in preparation of moving to a separate module#49118
Merged
thaJeztah merged 3 commits intomoby:masterfrom Dec 17, 2024
Merged
pkg/reexec: some cleaning up in preparation of moving to a separate module#49118thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah merged 3 commits intomoby:masterfrom
Conversation
Also use a slightly different name, because "reexec" is used so widely as term in this package, making it somewhat confusing. Signed-off-by: Sebastiaan van Stijn <[email protected]>
The reexec package originally was platform-agnostic, but gained some Linux-specific handling in 1cb17f0. When Windows support was implemented in Docker, the pkg/reexec package was adjusted accordingly in 64715c4, which now made the package with with either Linux or Windows, with various other platforms (freebsd, solaris, darwin) being added back in separate changes. Based on the history above, this package should be platform-agnostic, except for Linux-specific changes introduced in 1cb17f0 and 5aee880. This patch: - removes the stub-implementation to make it functional on other platforms. - renames the files for consistency Signed-off-by: Sebastiaan van Stijn <[email protected]>
Move the exported `Command` to a platform-agnostic file, and un-export the platform-specific implementations. This allows us to maintain the GoDoc in a single place, describing platform-specific differences where needed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
@crazy-max @vvoland PTAL 🤗 after this, I'll start preparing a migration to moby/sys |
crazy-max
approved these changes
Dec 17, 2024
robmry
approved these changes
Dec 17, 2024
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.
Relates to:
/pkg#32989pkg/reexec: use const for name of test binary
Also use a slightly different name, because "reexec" is used so
widely as term in this package, making it somewhat confusing.
pkg/reexec: make platform-agnostic (again)
relates to:
The reexec package originally was platform-agnostic, but gained some
Linux-specific handling in 1cb17f0.
When Windows support was implemented in Docker, the pkg/reexec package
was adjusted accordingly in 64715c4,
which now made the package with with either Linux or Windows, with various
other platforms (freebsd, solaris, darwin) being added back in separate
changes.
Based on the history above, this package should be platform-agnostic, except
for Linux-specific changes introduced in 1cb17f0
and 5aee880.
This patch
pkg/reexec: Command: separate public API from implementation
Move the exported
Commandto a platform-agnostic file, and un-exportthe platform-specific implementations. This allows us to maintain the
GoDoc in a single place, describing platform-specific differences where
needed.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)