Skip to content

Conversation

@hujun260
Copy link
Contributor

Summary

sighand: need block WAKEUP_SIGNAL in current tcb
If the main thread receives the signal, the waiter_main will not be awakened.

Impact

sighand

Testing

test in hardware esp32s3-devkit:nsh

nsh>
nsh>
nsh> ps
TID PID PPID PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK COMMAND
0 0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 Idle_Task
1 1 0 100 RR Task - Running 0000000000000000 0003016 nsh_main
nsh> uname -a
NuttX 12.12.0 a5fdde65305-dirty Jan 11 2026 17:49:38 xtensa esp32s3-devkit
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=3

user_main: Begin argument test

If the main thread receives the signal, the waiter_main will not be awakened.

Signed-off-by: hujun5 <[email protected]>
@hujun260 hujun260 force-pushed the apache_need_block_WAKEUP_SIGNAL branch from 5fe227f to 57ca54b Compare January 11, 2026 09:56
@cederom cederom changed the title sighand: need block WAKEUP_SIGNAL in current tcb testing/ostest/sighand: need block WAKEUP_SIGNAL in current tcb Jan 11, 2026
Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @hujun260 for fixing the ostest!

I would put testing/ostest/sighand: prefix in the git commit title :-)

@xiaoxiang781216 xiaoxiang781216 merged commit 21f4156 into apache:master Jan 11, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants