This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 42a4ba59c43ab37d63cd57cf12367fd8b8f5015c
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Oct 20 20:30:00 2026 +0200

    Documentation: Describe the E2BIG checks of posix_spawn().
    
    posix_spawn() and exec() fail with E2BIG for arguments and environment
    larger than ARG_MAX, and for arguments that do not fit the stack of the
    new task.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 Documentation/reference/user/01_task_control.rst | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/reference/user/01_task_control.rst 
b/Documentation/reference/user/01_task_control.rst
index 50df43ba4f1..91ce4c53afe 100644
--- a/Documentation/reference/user/01_task_control.rst
+++ b/Documentation/reference/user/01_task_control.rst
@@ -653,9 +653,11 @@ Functions
     A new task can get at most ``CONFIG_TASK_MAX_ARGS`` arguments (default
     256). A longer list fails with ``E2BIG``. ``CONFIG_TASK_ARG_MAX`` sets
     ``ARG_MAX`` and ``sysconf(_SC_ARG_MAX)`` (default 4096 bytes): the size
-    of the arguments and the environment that a program may pass. NuttX
-    does not check this size. The arguments are copied to the stack of the
-    new task, so its stack must be large enough for them.
+    of the arguments and the environment that a program may pass, counted
+    as the bytes of the strings with their terminators and of the pointers
+    to them. A larger list fails with ``E2BIG``. The arguments are copied
+    to the stack of the new task; if they do not fit there, the call also
+    fails with ``E2BIG``.
 
   :param envp: ``envp[]`` is an array of pointers to null-terminated
     ``name=value`` strings that is the environment of the new task. The

Reply via email to