Bump moby/buildkit

Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
This commit is contained in:
ulyssessouza
2019-12-11 14:13:56 +01:00
parent 3d630c6f7f
commit 3ff9abca3a
252 changed files with 23414 additions and 7187 deletions

View File

@@ -20,8 +20,6 @@ package fifo
import (
"syscall"
"github.com/pkg/errors"
)
// SyscallConn provides raw access to the fifo's underlying filedescrptor.
@@ -30,13 +28,13 @@ func (f *fifo) SyscallConn() (syscall.RawConn, error) {
// deterministic check for closed
select {
case <-f.closed:
return nil, errors.New("fifo closed")
return nil, ErrClosed
default:
}
select {
case <-f.closed:
return nil, errors.New("fifo closed")
return nil, ErrClosed
case <-f.opened:
return f.file.SyscallConn()
default:
@@ -68,7 +66,7 @@ type rawConn struct {
func (r *rawConn) Control(f func(fd uintptr)) error {
select {
case <-r.f.closed:
return errors.New("control of closed fifo")
return ErrCtrlClosed
case <-r.ready:
}
@@ -81,12 +79,12 @@ func (r *rawConn) Control(f func(fd uintptr)) error {
func (r *rawConn) Read(f func(fd uintptr) (done bool)) error {
if r.f.flag&syscall.O_WRONLY > 0 {
return errors.New("reading from write-only fifo")
return ErrRdFrmWRONLY
}
select {
case <-r.f.closed:
return errors.New("reading of a closed fifo")
return ErrReadClosed
case <-r.ready:
}
@@ -99,12 +97,12 @@ func (r *rawConn) Read(f func(fd uintptr) (done bool)) error {
func (r *rawConn) Write(f func(fd uintptr) (done bool)) error {
if r.f.flag&(syscall.O_WRONLY|syscall.O_RDWR) == 0 {
return errors.New("writing to read-only fifo")
return ErrWrToRDONLY
}
select {
case <-r.f.closed:
return errors.New("writing to a closed fifo")
return ErrWriteClosed
case <-r.ready:
}