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 207531fd3de32e0c9ed99f2fcf297e5ca9adebbf Author: Marco Casaroli <[email protected]> AuthorDate: Fri Oct 23 18:11:38 2026 +0200 Documentation: Say that kill() sends to a process group of one process. The kill() reference and the serial driver page said that kill() to a process group is not supported. It now sends the signal to the one process of the group. pid -1 (all processes) still gives ENOSYS. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/os/drivers/character/serial.rst | 8 ++++---- Documentation/reference/user/07_signals.rst | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Documentation/os/drivers/character/serial.rst b/Documentation/os/drivers/character/serial.rst index 89e52e7763a..3295a1a2ae5 100644 --- a/Documentation/os/drivers/character/serial.rst +++ b/Documentation/os/drivers/character/serial.rst @@ -60,10 +60,10 @@ Serial Device Drivers 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 - sending a signal to a process group (``kill(-pgrp, signo)``) is not - supported, TTY signals always target the single foreground PID rather - than an entire group. + ``tcgetsid()``, ``setsid()``, ``getsid()`` and ``setpgid()``. A process + group is one process, so ``kill(-pgrp, signo)`` and ``killpg()`` send + the signal to the process ``pgrp``, and TTY signals go to the single + foreground PID. - **User Access**. Serial drivers are, ultimately, normal `character drivers <#chardrivers>`__ and are accessed as other diff --git a/Documentation/reference/user/07_signals.rst b/Documentation/reference/user/07_signals.rst index 236a4e4997d..05eb13bceff 100644 --- a/Documentation/reference/user/07_signals.rst +++ b/Documentation/reference/user/07_signals.rst @@ -528,8 +528,9 @@ Equivalent to sigtimedwait() with a NULL timeout parameter. (see below). :param pid: The id of the task to receive the signal. The POSIX ``kill()`` specification encodes process group information as zero - and negative pid values. Only positive, non-zero values of pid are - supported by this implementation. ID of the task to receive signal + and negative pid values. A process group is one process in NuttX: + ``0`` is the caller and ``-pid`` is the process ``pid``. ``-1`` (all + processes) is not supported and gives ``ENOSYS``. :param signo: The signal number to send. If signo is zero, no signal is sent, but all error checking is performed. @@ -540,7 +541,9 @@ Equivalent to sigtimedwait() with a NULL timeout parameter. (see below). - Default action is to ignore signals. - Signals are processed one at a time in order - - Sending of signals to 'process groups' is not supported in NuttX. + - A process group is one process, so a signal to a process group goes + to that process. A signal to all processes (``pid`` -1) is not + supported. .. c:function:: int pause(void);
