Re: Bash uses lseek while reading from serial device

2014-08-19 Thread Corinna Vinschen
On Aug 18 22:39, Ross Ridge wrote: > Corinna Vinschen writes: > > On Linux isatty on a descriptor connected to serial line returns 0, > > on Cygwin it returned 1 so far. I fixed both problems here, isatty > > on a serial line returns 0 now, and lseek on serial (and, FWIW, > > sockets) don't simply

Re: Bash uses lseek while reading from serial device

2014-08-18 Thread Ross Ridge
Corinna Vinschen writes: > On Linux isatty on a descriptor connected to serial line returns 0, > on Cygwin it returned 1 so far. I fixed both problems here, isatty > on a serial line returns 0 now, and lseek on serial (and, FWIW, > sockets) don't simply return 0 anymore, but rather -1 with errno s

Re: Bash uses lseek while reading from serial device

2014-08-18 Thread Corinna Vinschen
On Aug 17 15:19, Linda Walsh wrote: > Being a bit of a busybody... > > I forwarded this to the bash list and chet responded there... > > so forwarding it back here... not sure what isatty is supposed to do > with a serial line, let alone one on windows... On Linux isatty on a descriptor connecte

Re: Bash uses lseek while reading from serial device

2014-08-17 Thread Linda Walsh
Being a bit of a busybody... I forwarded this to the bash list and chet responded there... so forwarding it back here... not sure what isatty is supposed to do with a serial line, let alone one on windows... Original Message Subject: Re: Fwd: Bash uses lseek while reading

Bash uses lseek while reading from serial device

2014-08-16 Thread Ross Ridge
I've encountered a problem where bash will use lseek to seek backwards on a serial device. This results in data being lost when large chuncks of data are being read at once. This doesn't happen when reading from a pipe, so it appears that bash is unable to detect that serial devices are unseekabl