1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/vendor/github.com/containerd/fifo
Sebastiaan van Stijn ba475d44a7
vendor: github.com/containerd/fifo 0724c46b320cf96bb172a0550c19a4b1fca4dacb
full diff: f15a329036...0724c46b32

- Add OpenFifoDup2
- use golang.org/x/sys/unix for dup2 (fixes build on arm64)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:50 +01:00
..
errors.go vendor containerd, BuildKit, protobuf, grpc, and golang.org/x 2020-03-03 10:25:20 +09:00
fifo.go vendor: github.com/containerd/fifo 0724c46b320cf96bb172a0550c19a4b1fca4dacb 2020-11-19 10:30:50 +01:00
go.mod vendor containerd, BuildKit, protobuf, grpc, and golang.org/x 2020-03-03 10:25:20 +09:00
handle_linux.go vendor containerd 779ef60231a555f7eb9ba82b052d59b69ca2ef10 2020-07-30 16:16:11 +00:00
handle_nolinux.go
LICENSE
mkfifo_nosolaris.go
mkfifo_solaris.go
raw.go vendor containerd 779ef60231a555f7eb9ba82b052d59b69ca2ef10 2020-07-30 16:16:11 +00:00
readme.md bump containerd/fifo a9fb20d87448d386e6d50b1f2e1fa70dcf0de43c 2019-04-14 23:55:27 +02:00

fifo

Build Status codecov

Go package for handling fifos in a sane way.

// OpenFifo opens a fifo. Returns io.ReadWriteCloser.
// Context can be used to cancel this function until open(2) has not returned.
// Accepted flags:
// - syscall.O_CREAT - create new fifo if one doesn't exist
// - syscall.O_RDONLY - open fifo only from reader side
// - syscall.O_WRONLY - open fifo only from writer side
// - syscall.O_RDWR - open fifo from both sides, never block on syscall level
// - syscall.O_NONBLOCK - return io.ReadWriteCloser even if other side of the
//     fifo isn't open. read/write will be connected after the actual fifo is
//     open or after fifo is closed.
func OpenFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error)


// Read from a fifo to a byte array.
func (f *fifo) Read(b []byte) (int, error)


// Write from byte array to a fifo.
func (f *fifo) Write(b []byte) (int, error)


// Close the fifo. Next reads/writes will error. This method can also be used
// before open(2) has returned and fifo was never opened.
func (f *fifo) Close() error 

Project details

The fifo is a containerd sub-project, licensed under the Apache 2.0 license. As a containerd sub-project, you will find the:

information in our containerd/project repository.