[−][src]Module file_descriptors::pipes_and_fifos
Anonymous and named, connected unidirectional pipes_and_fifos (act like TCP connected sockets).
Since Linux 2.6.35, the default pipe capacity is 16 pages (which are 4096 bytes on x86-64), but the capacity can be queried and set using the fcntl()
F_GETPIPE_SZ
and F_SETPIPE_SZ
operations.
The unread bytes in a pipe can be obtained using the fcntl()
operation FIONREAD
.
The maximum capacity that can be set for a non-privileged process (one without the CAP_SYS_RESOURCE
capability) is specified in the file /proc/sys/fs/pipe-max-size
; it defaults to 1Mb.
Writes of less than PIPE_BUF
bytes are atomic; PIPE_BUF
is 4096 bytes on Linux.
Atomic writes are significant when there are many writers sharing one named pipe (FIFO).
Structs
ReceivePipeFileDescriptor | Represents the receiving half of a pipe. |
SendPipeFileDescriptor | Represents the sending half of a pipe. |
Traits
SpliceRecipient | Marker trait for file descriptors that can receive from |
SpliceSender | Marker trait for file descriptors that can send to |