This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH]: Fix for errant tcgetattr() behavior
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 11 Aug 2005 13:03:40 -0400
- Subject: Re: [PATCH]: Fix for errant tcgetattr() behavior
- References: <42FB831B.6090108@gmail.com>
- Reply-to: cygwin-patches at cygwin dot com
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.
>Thanks,
>
>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.
Thanks.
cgf