8000 pkg/signal: make package self-contained (in preparation of moving to moby/sys) by thaJeztah · Pull Request #42641 · moby/moby · GitHub
[go: up one dir, main page]

Skip to content

Conversation

thaJeztah
Copy link
Member
@thaJeztah thaJeztah commented Jul 15, 2021

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 testing only

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 <github@gone.nl>
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 <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@cpuguy83 created a draft PR to migrate (using this branch); moby/sys#70

Copy link
Member
@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member
@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit 9a6ff68 into moby:master Jul 19, 2021
@thaJeztah thaJeztah deleted the make_signal_selfcontained branch July 19, 2021 22:24
@thaJeztah thaJeztah added this to the 21.xx milestone Jul 20, 2021
@thaJeztah
Copy link
Member Author

Updated moby/sys#70 and moved it out of draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0