Re: [PATCH v2 2/4] man/man3/termios.3: note that setserial(8) rate hacking is dangerous

Alejandro Colomar <[email protected]> Tue, 30 Jun 2026 11:15:20 +0200
Newsgroups org.kernel.vger.linux-man
Message-ID <akOJFM5tLTHCy9Jc@devuan>
Hi,

On 2026-06-29T06:59:06-0700, H. Peter Anvin wrote:
> The use of setserial(8) to modify the 38400 baud rate was an early
> hack to support baud rates beyond those standardized by POSIX. As it
> is, it is a real trap for applications that actually want to use 38400
> bps if a previous user has not cleaned up the setting.
> 
> Signed-off-by: H. Peter Anvin <[email protected]>

Thanks!  I've applied the patch.


Have a lovely day!
Alex

> ---
>  man/man3/termios.3 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man3/termios.3 b/man/man3/termios.3
> index cd3f9ce4d7c0..f563923fc7cf 100644
> --- a/man/man3/termios.3
> +++ b/man/man3/termios.3
> @@ -1119,7 +1119,9 @@ constant is defined prior to using it.
>  The actual bit rate corresponding to
>  .B B38400
>  may be altered with
> -.BR setserial (8).
> +.BR setserial (8);
> +doing so is discouraged as it may break other applications
> +later trying to use the same serial port.
>  .P
>  The input and output baud rates are stored in the
>  .I termios
> -- 
> 2.54.0
> 
> 

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmpDiScACgkQ64mZXMKQ
wqkOuhAAvk0M5qsgIXznlKnDF/RWx62/4AM3JoEl8rXtoCmfvS1nDtpGsnrm2zuk
pw6/SxWrtTT4AxoyLshrZwB4lrf6wFLKnIzUefGmnwi4TM4HQLqiCkESCagsWw76
M6PI+cKxDXML46aSohKnu2qIFOUeC5ZXReAC6dKkmn9bYLkdYE9ZXKchovZBlPkM
J3R+UeNjyOEM3vboC2qf61gF5FxqOE9+FCKvBPKY26ycZ3/vhaSUaF1ymuVwWILe
whaWa3kgSibjop/RiEb832Hkm/sDBdNnSNb0VMbZSnjRivVaS/KJT5H5BHgpEzvy
2FB2/KVipm2bjqeH+qmOpMfjrVMlmADH8ltZ6Af1OILRTd9+c6eQQOAarzwNNtho
eccm72oRq3EC2AxyCVV0EXGYaoaGDDXcWw3/6giTUDmtq6Xbrb8ttgqgcBZkiUrQ
t7/C5moaUDE0HOzBjiCUq8UKXF+wgA5h6pXkZG0j5OuInD8/q6d1Gh4kHpn/46iv
TXDAPYzWlenXzsjg+3sWLUlsd/LT5zsIkQGZ+Rx3Lmkm7MRFINkO5Nji3MM5IM8z
74vz/61uFrEJbpuAXUlREHWuhmGGcLM8L6tlom68ymJ+mxu4EB0OzaChO2XlgHwV
hCz+4O994fuUcSrLl1ENb9hvhSlt6ZKYpM7lXEahRiuUuwGMvTw=
=YjxC
-----END PGP SIGNATURE-----