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

Alejandro Colomar alx@kernel.org
Tue Jun 30 09:15:20 GMT 2026


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 <hpa@zytor.com>

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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260630/a2201730/attachment.sig>


More information about the Libc-alpha mailing list