[PATCH]: Fix for errant tcgetattr() behavior

Christopher Faylor cgf-no-personal-reply-please@cygwin.com
Thu Aug 11 17:03:00 GMT 2005

On Thu, Aug 11, 2005 at 10:55:55AM -0600, Troy Curtiss wrote:
>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.

Applied with a minor ChangeLog tweak.



More information about the Cygwin-patches mailing list