bug-coreutils
[Top][All Lists]
Advanced

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

Re: Improved tail patch


From: Paul Jarc
Subject: Re: Improved tail patch
Date: Thu, 22 Jul 2004 00:49:51 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

address@hidden wrote:
> Select always returns ready for a fifo.

No.  It always returns ready for a regular file.  For a pipe or
socket, it returns nonready if there is a writer on the other end, but
there is no data to read.  To see this, try
"{ sleep 60; echo foo; } > /tmp/test.fifo" and let the reader call
select during the sleep.  In your tests, the writer exits immediately,
which signals EOF.  So read() will return EOF without blocking in that
case, and select() reports that.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]