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 f24a36992d0c1b7d9bed789d8dd0de5011d17428
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Nov 11 20:03:12 2026 +0100

    sched/Kconfig: Make GROUP_KILL_CHILDREN_TIMEOUT_MS 0 by default.
    
    With the default -1, exit() sends SIGTERM to the other threads of the
    task group and waits until they all exit.  A thread that blocks or
    catches SIGTERM, or that waits without interruption in a system call,
    then keeps the process alive, and its parent never gets the exit
    status.
    
    Make 0 the default: exit() cancels the other threads at once, as the
    default action of a fatal signal already does.  POSIX exit() ends all
    threads of the process and does not send them a signal.  A board that
    wants the old behavior sets the option to -1 or to a timeout.
    
    Write the help text again: the signal is SIGTERM, not SIGQUIT, and
    task_restart() also uses the option.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 sched/Kconfig | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sched/Kconfig b/sched/Kconfig
index c9f4774cc5b..5a6a89055ba 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -2149,13 +2149,15 @@ config SCHED_BACKTRACE
 
 config GROUP_KILL_CHILDREN_TIMEOUT_MS
        int "Group kill children timeout"
-       default -1
+       default 0
        depends on !DISABLE_PTHREAD && SIG_SIGKILL_ACTION
        ---help---
-               Kill children a SIGQUIT signal before cancel them,
-               < 0 means wait until all the child thread exit
-               > 0 means wait timeout
-               = 0 means don't do kill signal
+               What exit() and task_restart() do with the other threads of
+               the task group before they cancel them:
+               = 0 means do not send a signal: cancel them at once
+               > 0 means send SIGTERM, then wait this number of milliseconds
+                   for them to exit
+               < 0 means send SIGTERM, then wait until they all exit
                The default action of a signal (abnormal termination) does not
                send the signal: it cancels the other threads at once.
 

Reply via email to