[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Bash uses lseek while reading from serial device
From: |
Eric Blake |
Subject: |
Re: Fwd: Bash uses lseek while reading from serial device |
Date: |
Mon, 18 Aug 2014 12:29:05 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 08/17/2014 04:12 PM, Chet Ramey wrote:
> Bash uses lseek to the current file position to check this. If the lseek
> returns -1/EPIPE, bash assumes the fd is not seekable. If it returns 0,
> bash assumes that it can move around freely. Since bash is trying to seek
> backwards in the file, stdin is either a regular file or a tty (in which
> case bash assumes that reads are newline-delimited by the device driver).
>
Root cause was a bug in cygwin not treating serial devices and other
chardevs as unseekable, differently than what Linux does. It should be
fixed in the next cygwin dll release, with no need for bash to do
anything differently than it has always done.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature