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 c45caa3330b052ed52f01f66ead55bf39c079ce1
Author: Marco Casaroli <[email protected]>
AuthorDate: Fri Oct 23 17:50:25 2026 +0200

    Documentation: Say that TIOCSPGRP takes a pointer to the PID.
    
    The serial driver page said that TIOCSPGRP takes the PID as a value.
    tcsetpgrp() passes a pointer, and the drivers now read it so.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 Documentation/os/drivers/character/serial.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/os/drivers/character/serial.rst 
b/Documentation/os/drivers/character/serial.rst
index d0349aec3f0..9040b4c2019 100644
--- a/Documentation/os/drivers/character/serial.rst
+++ b/Documentation/os/drivers/character/serial.rst
@@ -54,8 +54,9 @@ Serial Device Drivers
    -  ``TIOCNOTTY`` gives up the controlling terminal.
    -  ``TIOCGPGRP`` / ``TIOCGSID`` return the foreground process group /
       session leader PID.
-   -  ``TIOCSPGRP`` sets the foreground process group PID (a value of
-      ``0`` selects the calling task).
+   -  ``TIOCSPGRP`` sets the foreground process group PID.  As
+      ``tcsetpgrp()`` passes it, ``arg`` points to the PID (``pid_t *``);
+      a ``NULL`` pointer or a PID that is not positive gives ``EINVAL``.
 
    The C library exposes these through ``tcgetpgrp()``, ``tcsetpgrp()``,
    ``tcgetsid()``, ``setsid()``, ``getsid()`` and ``setpgid()``.  Because

Reply via email to