exclude OpenFifoDup2() on Windows#36
Merged
dmcgowan merged 1 commit intocontainerd:masterfrom Mar 25, 2021
Merged
Conversation
Commit 9c214ed updated this function, and replaced syscall.Dup2() for golang.org/x/sys/unix.Dup2(), which is not available on Windows. This patch splits the API from the implementation, and moves the unix implementation to a "unix" file; a stub is added for Windows. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
@mxpv @estesp ptal; was a bit in doubt if we needed the stub, but possibly it could be handy so that we don't have to stub in containerd; https://github.com/containerd/containerd/blob/b9092fae15f1814a5402bea1ceb0fa21ce1c785c/runtime/v2/shim/shim_unix.go#L92-L94 / https://github.com/containerd/containerd/blob/d8527867057daa93c17423ec7cd3438696b1c899/runtime/v2/shim/shim_windows.go#L55-L57 (happy to remove though if you think it's adding too much complexity) |
AkihiroSuda
approved these changes
Mar 23, 2021
mxpv
approved these changes
Mar 23, 2021
This was referenced Mar 23, 2021
Member
Author
|
Also opened a draft to run linters on macOS and Windows so that we can catch these; #38 (will rebase after this is merged) |
dmcgowan
approved these changes
Mar 25, 2021
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.
Commit 9c214ed (#28) updated this function, and replaced
syscall.Dup2()forgolang.org/x/sys/unix.Dup2(), which is not available on Windows.This patch splits the API from the implementation, and moves the unix implementation to a "unix" file; as stub is added for Windows.