From: dan DOT hensley AT sdrc DOT com (Dan Hensley) Subject: Re: Can outsiders get simple questions answered? 30 Dec 1998 22:57:40 -0800 Message-ID: <368AA814.BC3282C.cygnus.gnu-win32@sdrc.com> References: <367F31DC DOT B8E71A57 AT sdrc DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com Cc: Christopher Faylor Chris, Christopher Faylor wrote: > On Wed, Dec 30, 1998 at 02:24:19PM -0700, Dan Hensley wrote: > >But it still looks like tcsetattr isn't able to set all of my > >attributes correctly, namely: > > > >iflag: ICRNL > >cflag: CREAD > > Neither of these is implemented by Cygwin. Do you know if there are any plans to implement these in the future? > >I'm also finding some other strange behavior: > >* When I set both serial port and keyboard for polling by select, and I > >enter something via serial port, it FD_ISSET() correctly tells me that > >the serial port had the input. However, read() locks up my bash > >session (or at least won't return control--I can still type) when I try > >to read the buffer after serial port input. I believe this may be due > >to ICRNL not being set. Any thoughts? > > Since Cygwin doesn't currently do anything but raw reads on the serial > port, you're probably seeing a wait while your buffer fills up. You > can work around this by doing one byte reads or by playing with VMIN > or VTIME although neither of those is fully implemented either. I'll take a look at that and see what I can come up with. > >* When I set both serial port and keyboard for polling by select, and I > >enter something via the keyboard, FD_ISSET() tells me that both the > >keyboard and the serial port had input. > > My test case doesn't show this. Sorry. Hmmm... That's weird. I'll take a closer look at the fd_set structure and the macro and see if I can see why this is happening. The workaround is simple enough in the code, but I'd like to understand what's happening. Would you like my source code for debugging/testcase purposes (it's changed a little from the original I sent)? Thanks, Dan -- Dan Hensley Engineer - SDRC Operations (ATA) Denver, CO W:303/464-7049 http://www.sdrc.com/ - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".