pkg/signal: make package self-contained (in preparation of moving to moby/sys)#42641
Merged
cpuguy83 merged 3 commits intomoby:masterfrom Jul 19, 2021
Merged
pkg/signal: make package self-contained (in preparation of moving to moby/sys)#42641cpuguy83 merged 3 commits intomoby:masterfrom
cpuguy83 merged 3 commits intomoby:masterfrom
Conversation
It is not directly related to signal-handling, so can well live in its own package. Also added a variant that doesn't take a directory to write files to, for easier consumption / better match to how it's used. Signed-off-by: Sebastiaan van Stijn <[email protected]>
It's the only location where this is used, and it's quite specific to dockerd (not really a reusable function for external use), so moving it into that package. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
@cpuguy83 created a draft PR to migrate (using this branch); moby/sys#70 |
Member
Author
|
Updated moby/sys#70 and moved it out of draft |
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.
This moves docker-specific code to different locations, and removes non-essential dependencies:
pkg/signal: move signal.DumpStacks() to a separate package
It is not directly related to signal-handling, so can well live
in its own package.
Also added a variant that doesn't take a directory to write files
to, for easier consumption / better match to how it's used.
pkg/signal: move Trap() to cmd/dockerd
It's the only location where this is used, and it's quite specific
to dockerd (not really a reusable function for external use), so
moving it into that package.
pkg/signal: remove gotest.tools dependency
Use stdlib
testingonly