Re: Fwd: Bash uses lseek while reading from serial device

2014-08-18 Thread Eric Blake
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, stdi

Re: Bash uses lseek while reading from serial device

2014-08-17 Thread Linda Walsh
Thanks, I'll pass this on...(back)? (busybodiesRus?) Chet Ramey wrote: The original poster's speculation is correct. Bash is not allowed to read more input from stdin than it actually consumes, so commands that it runs get the intended input. To that end, it tries to detect whether or not t

Re: Fwd: Bash uses lseek while reading from serial device

2014-08-17 Thread Chet Ramey
On 8/17/14, 1:47 AM, Linda Walsh wrote: > ?? Could this be a cygwin bug? It's hard to see why cygwin > would start using lseek calls when running bash unless bash called > them... but then tha's not to say something else entirely may be going on as > this is running on Windows... ;-/ The origina

Fwd: Bash uses lseek while reading from serial device

2014-08-16 Thread Linda Walsh
erest here... Original Message Subject: Bash uses lseek while reading from serial device Date: Sat, 16 Aug 2014 14:47:39 -0400 From: Ross Ridge To: cyg...@cygwin.com I've encountered a problem where bash will use lseek to seek backwards on a serial device. This