This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in stty or /dev/ttySx handling code


Hi Peter,
That was my patch applied back in 02/01/2003 and upon re-examining it, I believe this is an error. The intended behavior was 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 violates #2. I am sending a patch to fix this to cygwin-patches right now (CC'ing you, as well.) Thanks for bringing this to my attention - I don't know what I was thinking that day :)

-Troy

Hi,

I'm seeing problems when I run stty. If I run stty -F /dev/ttyS0, it shows 0 baud. I found this thread from may that has the same issue:

http://sourceware.org/ml/cygwin/2005-05/msg00399.html

and I found that a patch was applied in 02/01/2003 that seems to prevent setting the baud if the DTR is zero. Why is the baud invalid when DTR is not set? It seems like to me that DTR doesn't/shouldn't have an affect on the reported baud. Can anyone shed some light on this?

Thanks,
Peter



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]