Re: [PATCH v2] select.2: blocks on the read end (if the write end of the fifo has never been opened).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Nov 22, 2022 at 07:32:20PM +0100, J.H. van de Water wrote:
> Clarify that select(2) will block on the read end of a pipe/fifo, if the
> write end of the pipe/fifo has never been opened before, unlike read(2).
> 
> Signed-off-by: J.H. vd Water <henri.van.de.water@xxxxxxxxx>

I just saw this mail in my inbox; sorry for the delay!

> ---
>  man2/select.2 | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/man2/select.2 b/man2/select.2
> index 199522a01..673d626a9 100644
> --- a/man2/select.2
> +++ b/man2/select.2
> @@ -77,6 +77,15 @@ perform a corresponding I/O operation (e.g.,
>  or a sufficiently small
>  .BR write (2))
>  without blocking.
> +.PP
> +However, note that
> +.BR select ()
> +will block on the read end of a pipe/fifo, if the write end of
> +the pipe/fifo has never been opened before, unlike
> +.BR read (2).
> +(read(2) will always return with zero if the write end of
> +the pipe/fifo is closed - see pipe(7) where the text starts with

read(2) and pipe(7) above should be marked up as man page references.

Thanks,
Alex

> +I/O on pipes and FIFOs).
>  .\"
>  .SS fd_set
>  A structure type that can represent a set of file descriptors.
> -- 
> 2.38.1
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux