Skip to content

examples/nxmbserver: Reset g_running on every run. - #3828

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
raiden00pl:nxmbserver-restart
Oct 11, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
raiden00pl:nxmbserver-restart

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

Summary

g_running was initialized to true only at load time and the signal handler sets it to false. NuttX does not re-initialize .data between runs of a builtin, so after one SIGINT/SIGTERM every later nxmbserver run in the same boot left the poll loop at once. Set g_running before connecting the signal handlers.

Impact

bugfix

Testing

detected by automate tests from https://github.com/railab/nuttx-testlab

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @raiden00pl good catch :-)

CI failed.. I guess this is unrelated.. but please merge only after successful CI :-)

g_running was initialized to true only at load time and the signal
handler sets it to false. NuttX does not re-initialize .data between
runs of a builtin, so after one SIGINT/SIGTERM every later nxmbserver
run in the same boot left the poll loop at once. Set g_running before
connecting the signal handlers.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: raiden00pl <raiden00@railab.me>
@xiaoxiang781216
xiaoxiang781216 merged commit c85eed6 into apache:master Oct 11, 2026
41 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