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