server: shuffle platform dependent operations
This commit is contained in:
parent
4d88008a65
commit
cc39203b09
10 changed files with 821 additions and 718 deletions
|
@ -6,13 +6,13 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/kubernetes-incubator/cri-o/oci"
|
||||
"github.com/kubernetes-incubator/cri-o/utils"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/sys/unix"
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
|
||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||
|
@ -60,7 +60,7 @@ func (ss streamService) Attach(containerID string, inputStream io.Reader, output
|
|||
}
|
||||
|
||||
controlPath := filepath.Join(c.BundlePath(), "ctl")
|
||||
controlFile, err := os.OpenFile(controlPath, unix.O_WRONLY, 0)
|
||||
controlFile, err := os.OpenFile(controlPath, syscall.O_WRONLY, 0)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to open container ctl file: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue