On Wed, Sep 11, 2002, Muli Ben-Yehuda wrote about "Re: tail(1) and char device files":
> On Wed, Sep 11, 2002 at 07:22:28PM +0300, Nadav Har'El wrote:
> > POSIX (or SUv3) is available online freely, by the way, so you might want
> > to have a look.
> 
> I intend to, when I'll find the time :) 

Ok, I saved you the time :) Here's the relevant part from SUSv3:

"If the input file is a regular file or if the file operand specifies a
 FIFO, do not terminate after the last line of the input file has been
 copied, but read and copy further bytes from the input file when they
 become available. If no file operand is specified and standard input
 is a pipe, the -f option shall be ignored. If the input file is not a
 FIFO, pipe, or regular file, it is unspecified whether or not the -f
 option shall be ignored."

And in the rationale section:

"Historical documentation indicates that tail ignores the -f option if
 the input file is a pipe (pipe and FIFO on systems that support FIFOs).
 On BSD-based systems, this has been true; on System V-based systems,
 this was true when input was taken from standard input, but it did not
 ignore the -f flag if a FIFO was named as the file operand. Since the
 -f option is not useful on pipes and all historical implementations
 ignore -f if no file operand is specified and standard input is a pipe,
 this volume of IEEE Std 1003.1-2001 requires this behavior. However,
 since the -f option is useful on a FIFO, this volume of IEEE
 Std 1003.1-2001 also requires that if standard input is a FIFO or a FIFO
 is named, the -f option shall not be ignored. Although historical behavior
 does not ignore the -f option for other file types, this is unspecified
 so that implementations are allowed to ignore the -f option if it is
 known that the file cannot be extended."

-- 
Nadav Har'El                        |    Wednesday, Sep 11 2002, 6 Tishri 5763
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |If glory comes after death, I'm not in a
http://nadav.harel.org.il           |hurry. (Latin proverb)

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to