Repository navigation
examples/nxmbserver: Reset g_running on every run. - #3828
Merged
Merged
Conversation
xiaoxiang781216
approved these changes
Oct 10, 2026
cederom
approved these changes
Oct 11, 2026
cederom
left a comment
Contributor
There was a problem hiding this comment.
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>
raiden00pl
force-pushed
the
nxmbserver-restart
branch
from
October 11, 2026 14:20
a604bf1 to
8ce287b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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