bug-bash
[Top][All Lists]
Advanced

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

Re: Why does "mapfile -d delim" (delim != '\n') use unbuffered read?


From: Chet Ramey
Subject: Re: Why does "mapfile -d delim" (delim != '\n') use unbuffered read?
Date: Tue, 4 May 2021 08:59:10 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

On 5/4/21 3:26 AM, Andreas Schwab wrote:
On Mai 03 2021, Chet Ramey wrote:

It won't work on any system that doesn't return -1/ESPIPE when you try
to lseek on a terminal device. Glibc does;

Glibc doesn't do anything, it just uses what the kernel says.

You'd think, but the manual says otherwise about ESPIPE:

"The filedes corresponds to an object that cannot be positioned, such as a
pipe, FIFO or terminal device. (POSIX.1 specifies this error only for pipes
and FIFOs, but on GNU systems, you always get ESPIPE if the object is not
seekable.)"

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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