go.mod: github.com/containerd/fifo v1.0.0
full diff: https://github.com/containerd/fifo/compare/115abcc95a1d...v1.0.0 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bbbd851381
commit
1c03c377e5
10
container.go
10
container.go
@ -32,7 +32,7 @@ import (
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/containerd/runtime/v2/runc/options"
|
||||
"github.com/containerd/containerd/sys"
|
||||
"github.com/containerd/fifo"
|
||||
"github.com/containerd/typeurl"
|
||||
prototypes "github.com/gogo/protobuf/types"
|
||||
ver "github.com/opencontainers/image-spec/specs-go"
|
||||
@ -435,12 +435,12 @@ func loadFifos(response *tasks.GetResponse) *cio.FIFOSet {
|
||||
err error
|
||||
dirs = map[string]struct{}{}
|
||||
)
|
||||
for _, fifo := range fifos {
|
||||
if isFifo, _ := sys.IsFifo(fifo); isFifo {
|
||||
if rerr := os.Remove(fifo); err == nil {
|
||||
for _, f := range fifos {
|
||||
if isFifo, _ := fifo.IsFifo(f); isFifo {
|
||||
if rerr := os.Remove(f); err == nil {
|
||||
err = rerr
|
||||
}
|
||||
dirs[filepath.Dir(fifo)] = struct{}{}
|
||||
dirs[filepath.Dir(f)] = struct{}{}
|
||||
}
|
||||
}
|
||||
for dir := range dirs {
|
||||
|
2
go.mod
2
go.mod
@ -10,7 +10,7 @@ require (
|
||||
github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68
|
||||
github.com/containerd/console v1.0.2
|
||||
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e
|
||||
github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d
|
||||
github.com/containerd/fifo v1.0.0
|
||||
github.com/containerd/go-cni v1.0.2
|
||||
github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0
|
||||
github.com/containerd/imgcrypt v1.1.1
|
||||
|
3
go.sum
3
go.sum
@ -136,8 +136,9 @@ github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv
|
||||
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
||||
github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
|
||||
github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
|
||||
github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d h1:u6sWqdNGAy7+O8qG/r1dqdnZE7IdEjteK3WGuvbfreo=
|
||||
github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
|
||||
github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU=
|
||||
github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
|
||||
github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU=
|
||||
github.com/containerd/go-cni v1.0.2 h1:YbJAhpTevL2v6u8JC1NhCYRwf+3Vzxcc5vGnYoJ7VeE=
|
||||
github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk=
|
||||
|
@ -80,8 +80,8 @@ github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn
|
||||
github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ=
|
||||
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e h1:6JKvHHt396/qabvMhnhUZvWaHZzfVfldxE60TK8YLhg=
|
||||
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
|
||||
github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d h1:u6sWqdNGAy7+O8qG/r1dqdnZE7IdEjteK3WGuvbfreo=
|
||||
github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
|
||||
github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU=
|
||||
github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
|
||||
github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk=
|
||||
github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g=
|
||||
github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0 h1:e+50zk22gvHLJKe8+d+xSMyA88PPQk/XfWuUw1BdnPA=
|
||||
|
@ -34,7 +34,6 @@ import (
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"github.com/containerd/containerd/pkg/stdio"
|
||||
"github.com/containerd/containerd/sys"
|
||||
"github.com/containerd/fifo"
|
||||
runc "github.com/containerd/go-runc"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
@ -179,7 +178,7 @@ func copyPipes(ctx context.Context, rio runc.IO, stdin, stdout, stderr string, w
|
||||
},
|
||||
},
|
||||
} {
|
||||
ok, err := sys.IsFifo(i.name)
|
||||
ok, err := fifo.IsFifo(i.name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
1
vendor/github.com/containerd/fifo/.gitattributes
generated
vendored
Normal file
1
vendor/github.com/containerd/fifo/.gitattributes
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.go text eol=lf
|
4
vendor/github.com/containerd/fifo/errors.go
generated
vendored
4
vendor/github.com/containerd/fifo/errors.go
generated
vendored
@ -16,9 +16,7 @@
|
||||
|
||||
package fifo
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
ErrClosed = errors.New("fifo closed")
|
||||
|
4
vendor/github.com/containerd/fifo/fifo.go
generated
vendored
4
vendor/github.com/containerd/fifo/fifo.go
generated
vendored
@ -1,3 +1,5 @@
|
||||
// +build !windows
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
@ -74,7 +76,7 @@ func OpenFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (io.Re
|
||||
func openFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (*fifo, error) {
|
||||
if _, err := os.Stat(fn); err != nil {
|
||||
if os.IsNotExist(err) && flag&syscall.O_CREAT != 0 {
|
||||
if err := mkfifo(fn, uint32(perm&os.ModePerm)); err != nil && !os.IsExist(err) {
|
||||
if err := syscall.Mkfifo(fn, uint32(perm&os.ModePerm)); err != nil && !os.IsExist(err) {
|
||||
return nil, errors.Wrapf(err, "error creating fifo %v", fn)
|
||||
}
|
||||
} else {
|
||||
|
8
vendor/github.com/containerd/fifo/handle_nolinux.go
generated
vendored
8
vendor/github.com/containerd/fifo/handle_nolinux.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// +build !linux
|
||||
// +build !linux,!windows
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
@ -38,8 +38,8 @@ func getHandle(fn string) (*handle, error) {
|
||||
|
||||
h := &handle{
|
||||
fn: fn,
|
||||
dev: uint64(stat.Dev),
|
||||
ino: uint64(stat.Ino),
|
||||
dev: uint64(stat.Dev), //nolint: unconvert
|
||||
ino: uint64(stat.Ino), //nolint: unconvert
|
||||
}
|
||||
|
||||
return h, nil
|
||||
@ -50,7 +50,7 @@ func (h *handle) Path() (string, error) {
|
||||
if err := syscall.Stat(h.fn, &stat); err != nil {
|
||||
return "", errors.Wrapf(err, "path %v could not be statted", h.fn)
|
||||
}
|
||||
if uint64(stat.Dev) != h.dev || uint64(stat.Ino) != h.ino {
|
||||
if uint64(stat.Dev) != h.dev || uint64(stat.Ino) != h.ino { //nolint: unconvert
|
||||
return "", errors.Errorf("failed to verify handle %v/%v %v/%v for %v", stat.Dev, h.dev, stat.Ino, h.ino, h.fn)
|
||||
}
|
||||
return h.fn, nil
|
||||
|
25
vendor/github.com/containerd/fifo/mkfifo_nosolaris.go
generated
vendored
25
vendor/github.com/containerd/fifo/mkfifo_nosolaris.go
generated
vendored
@ -1,25 +0,0 @@
|
||||
// +build !solaris
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package fifo
|
||||
|
||||
import "syscall"
|
||||
|
||||
func mkfifo(path string, mode uint32) (err error) {
|
||||
return syscall.Mkfifo(path, mode)
|
||||
}
|
27
vendor/github.com/containerd/fifo/mkfifo_solaris.go
generated
vendored
27
vendor/github.com/containerd/fifo/mkfifo_solaris.go
generated
vendored
@ -1,27 +0,0 @@
|
||||
// +build solaris
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package fifo
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func mkfifo(path string, mode uint32) (err error) {
|
||||
return unix.Mkfifo(path, mode)
|
||||
}
|
2
vendor/github.com/containerd/fifo/raw.go
generated
vendored
2
vendor/github.com/containerd/fifo/raw.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// +build go1.12
|
||||
// +build !windows
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
2
sys/filesys.go → vendor/github.com/containerd/fifo/utils.go
generated
vendored
2
sys/filesys.go → vendor/github.com/containerd/fifo/utils.go
generated
vendored
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package sys
|
||||
package fifo
|
||||
|
||||
import "os"
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -79,7 +79,7 @@ github.com/containerd/continuity/proto
|
||||
github.com/containerd/continuity/sysx
|
||||
github.com/containerd/continuity/testutil
|
||||
github.com/containerd/continuity/testutil/loopback
|
||||
# github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d
|
||||
# github.com/containerd/fifo v1.0.0
|
||||
## explicit
|
||||
github.com/containerd/fifo
|
||||
# github.com/containerd/go-cni v1.0.2
|
||||
|
Loading…
Reference in New Issue
Block a user