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 ef611627a5cc5100c7c62d00985f1c6cd85d3e9a Author: Marco Casaroli <[email protected]> AuthorDate: Sat Oct 17 20:42:05 2026 +0200 Documentation: Describe when sigsuspend() restores the signal mask. sigsuspend() runs the handlers of the signals that its mask unblocks before it restores the original mask, also in a system call. The page did not say this, and it listed the restore of the mask as a difference from POSIX, which requires it. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/reference/user/07_signals.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/reference/user/07_signals.rst b/Documentation/reference/user/07_signals.rst index 718362a3371..236a4e4997d 100644 --- a/Documentation/reference/user/07_signals.rst +++ b/Documentation/reference/user/07_signals.rst @@ -386,7 +386,9 @@ provided by NuttX: If the effect of the set argument is to unblock a pending signal, then no wait is performed. - The original signal mask is restored when sigsuspend() returns. + The original signal mask is restored when sigsuspend() returns. The + handlers of the signals that ``set`` unblocks run first, with ``set`` + still installed, also when sigsuspend() is a system call. Waiting for an empty signal set stops a task without freeing any resources (a very bad idea). @@ -398,7 +400,6 @@ provided by NuttX: **POSIX Compatibility:** Comparable to the POSIX interface of the same name. Differences from the POSIX specification include: - - POSIX does not indicate that the original signal mask is restored. - POSIX states that sigsuspend() "suspends the task until delivery of a signal whose action is either to execute a signal-catching function or to terminate the task." Only delivery of the signal is required in
