From 764afa0d180f5dbcf870350eb926745bde4a53dd Mon Sep 17 00:00:00 2001 From: "Justin Terry (VM)" Date: Mon, 28 Jan 2019 12:41:50 -0800 Subject: [PATCH] Include extension for shim binary format on Windows Use full name including extension for shim binary format on Windows in order to match any stat path faster without a fallback. Signed-off-by: Justin Terry (VM) --- runtime/v2/shim/util.go | 2 -- runtime/v2/shim/util_unix.go | 2 ++ runtime/v2/shim/util_windows.go | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/v2/shim/util.go b/runtime/v2/shim/util.go index 77afaa1f3..44419a95f 100644 --- a/runtime/v2/shim/util.go +++ b/runtime/v2/shim/util.go @@ -31,8 +31,6 @@ import ( "github.com/pkg/errors" ) -const shimBinaryFormat = "containerd-shim-%s-%s" - var runtimePaths sync.Map // Command returns the shim command with the provided args and configuration diff --git a/runtime/v2/shim/util_unix.go b/runtime/v2/shim/util_unix.go index 262fe2b36..b86f8624a 100644 --- a/runtime/v2/shim/util_unix.go +++ b/runtime/v2/shim/util_unix.go @@ -31,6 +31,8 @@ import ( "github.com/pkg/errors" ) +const shimBinaryFormat = "containerd-shim-%s-%s" + func getSysProcAttr() *syscall.SysProcAttr { return &syscall.SysProcAttr{ Setpgid: true, diff --git a/runtime/v2/shim/util_windows.go b/runtime/v2/shim/util_windows.go index 594a0f75b..ef26ebe22 100644 --- a/runtime/v2/shim/util_windows.go +++ b/runtime/v2/shim/util_windows.go @@ -29,6 +29,8 @@ import ( "github.com/pkg/errors" ) +const shimBinaryFormat = "containerd-shim-%s-%s.exe" + func getSysProcAttr() *syscall.SysProcAttr { return nil }