fifo

package
v1.14.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFifo

func OpenFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error)

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL