This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ce05d0af925db4d2eee2d0607390a552e8d4c9e7 Author: Marco Casaroli <[email protected]> AuthorDate: Tue Oct 20 20:55:59 2026 +0200 Documentation: Describe the terminal window size ioctls. Describe TIOCGWINSZ, TIOCSWINSZ and SIGWINCH for the serial and pseudo-terminal drivers. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/os/drivers/character/serial.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/os/drivers/character/serial.rst b/Documentation/os/drivers/character/serial.rst index 3295a1a2ae5..2f338ea8c55 100644 --- a/Documentation/os/drivers/character/serial.rst +++ b/Documentation/os/drivers/character/serial.rst @@ -65,6 +65,15 @@ Serial Device Drivers the signal to the process ``pgrp``, and TTY signals go to the single foreground PID. +- **Window size**. ``TIOCGWINSZ`` returns the terminal size in a + ``struct winsize`` and ``TIOCSWINSZ`` sets it. The size is 0 rows + and 0 columns until a program sets it (for example ``openpty()`` or + a remote login server). A change of the size sends ``SIGWINCH`` to + the foreground PID when ``CONFIG_TTY_SIGINT`` or + ``CONFIG_TTY_SIGTSTP`` is enabled. A pseudo-terminal keeps one size + for the master and the slave; the signal goes to the foreground PID + of the slave. + - **User Access**. Serial drivers are, ultimately, normal `character drivers <#chardrivers>`__ and are accessed as other character drivers.
