All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: "H . Peter Anvin" <hpa@zytor.com>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: [PATCH v2 4/4] man/man3/termios.3: document that cfsetispeed(..., 0) is deprecated
Date: Mon, 29 Jun 2026 06:59:08 -0700	[thread overview]
Message-ID: <20260629135910.143781-5-hpa@zytor.com> (raw)
In-Reply-To: <20260629135910.143781-1-hpa@zytor.com>

POSIX.1-2024 deprecated cfsetispeed(..., 0). This was always rather
confusing, since all other uses of speed_t use the Bnnn symbolic
constants, although B0 == 0 was largely universal.

Document that setting the input speed to numeric-zero meaning the same
as the output speed is deprecated, and applications should explicitly
set it to the same value as the output baud rate instead.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 man/man3/termios.3 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/man/man3/termios.3 b/man/man3/termios.3
index 84b10cb7d68c..9a606e689e80 100644
--- a/man/man3/termios.3
+++ b/man/man3/termios.3
@@ -1182,6 +1182,9 @@ even when using
 the input baud rate
 will be equal to the output baud rate.
 .P
+POSIX.1-2024 deprecated this; new code should explicitly set both the
+input and output baud rates to the same value.
+.P
 .BR cfsetspeed ()
 is a 4.4BSD extension.
 It takes the same arguments as
-- 
2.54.0


      parent reply	other threads:[~2026-06-29 13:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29  6:02 [PATCH 1/1] man/man3*: document the glibc 2.42+ baud_t termios interface H. Peter Anvin
2026-06-29  9:51 ` Alejandro Colomar
2026-06-29 13:59   ` [PATCH v2 0/4] update termios(3) for glibc 2.42+ and POSIX.1-2024 H. Peter Anvin
2026-06-29 13:59     ` [PATCH v2 1/4] man/man3*: document the glibc 2.42+ baud_t termios interface H. Peter Anvin
2026-06-30 10:39       ` Alejandro Colomar
2026-06-30 20:37         ` H. Peter Anvin
2026-06-30 21:17           ` Alejandro Colomar
2026-06-30 22:01             ` H. Peter Anvin
2026-07-01 14:53               ` Alejandro Colomar
2026-06-30 22:50           ` G. Branden Robinson
2026-06-30 20:41         ` H. Peter Anvin
2026-06-30 21:19           ` Alejandro Colomar
2026-06-29 13:59     ` [PATCH v2 2/4] man/man3/termios.3: note that setserial(8) rate hacking is dangerous H. Peter Anvin
2026-06-30  9:15       ` Alejandro Colomar
2026-06-29 13:59     ` [PATCH v2 3/4] man/man3/termios.3: document that output baud rate has priority H. Peter Anvin
2026-06-29 13:59     ` H. Peter Anvin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260629135910.143781-5-hpa@zytor.com \
    --to=hpa@zytor.com \
    --cc=alx@kernel.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.