[PATCH]: Fix for errant tcgetattr() behavior

Troy Curtiss trcurtiss@gmail.com
Thu Aug 11 16:56:00 GMT 2005

Way back in 02/01/2003, a patch of mine was applied that enhanced 
tcsetattr() to handle setting baud rate B0 correctly (ie. dropping DTR, 
leave actual baud rate alone), but added some incorrect behavior in 
tcgetattr().  The correct behavior, I believe, should be as follows:

1) When a baud rate of B0 is passed to tcsetattr(), it should not change 
the actual baud rate, but instead drop DTR.
2) In tcgetattr(), the presently set baud rate should be returned, 
regardless of the state of DTR.

My earlier patch broke #2.  The attached patch fixes this error, and 
tcgetattr() now returns the correct baud rate regardless of DTR state.  


Changelog entry:
* fhandler_serial.cc (fhandler_serial::tcgetattr):  Make tcgetattr() 
return current baud rate regardless of current DTR state.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sttyfix_tcgetattr_b0.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20050811/37b0ffe4/attachment.ksh>

More information about the Cygwin-patches mailing list