coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stty: problem if IXON enabled and DC3 char was received


From: Pádraig Brady
Subject: Re: stty: problem if IXON enabled and DC3 char was received
Date: Mon, 4 Jan 2016 10:27:27 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 04/01/16 08:06, Tomas Krcka wrote:
> Hi,
>   I had a problem with setting baudrate of serial line by stty command.
> I tried to change the baudrate, but the stty went to frozen state.
> I found out that problem is that kernel has IXON enabled as default
> and before change of speed the line received DC3 char. It's illegal
> character in this situation, it happens once per 100 starts of the
> system.
> 
> Example situation:
>    IXON is enabled in kernel by default and a serial line received DC3
> char and then you can not disable IXON. There is waiting for empty
> buffer in kernel but sending is stopped because of DC3 char.
> 
> If TCSADRAIN is changed to TCSANOW then it's correct.
> 
> Do you have any opinion about the situation ? Is it possible to change
> TCSADRAIN to TCSANOW or create a new parameter of stty to change the
> serial line settings immediately ?

Interesting. I see that Red Hat systems for the last 6 years
have unconditionally used TCSANOW rather than TCSADRAIN due to:
https://bugzilla.redhat.com/504798

I see a similar 13 year old request to debian:
https://bugs.debian.org/210475

I see that FreeBSD uses TCSANOW (well the equivalent 0 value).

Now it's tempting to use TCSANOW unconditionally
though it does seem safer to drain pending output before changing settings,
so an option like you suggest seems appropriate.

thanks,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]