Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* ADD [broker] Add signal handler in broker #1530

Merged
merged 1 commit into from Nov 16, 2023
Merged

* ADD [broker] Add signal handler in broker #1530

merged 1 commit into from Nov 16, 2023

Conversation

RanMaoyi
Copy link
Contributor

No description provided.

#if !defined(NANO_PLATFORM_WINDOWS)
#include <signal.h>
#include <errno.h>
static const all_signals[] = {

Check notice

Code scanning / CodeQL

Unused static variable Note

Static variable all_signals is never read.
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
nanomq/apps/broker.c Show resolved Hide resolved
if (sigaction(all_signals[i], &act, NULL)) {
fprintf(stderr, "Cannot install signal %d handler: %s.\n", all_signals[i], strerror(errno));
}
} while (all_signals[i++] != SIGTERM);
Copy link
Member

Choose a reason for hiding this comment

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

@wanghaEMQ want broker exit while receving SIGINT

nanomq/apps/broker.c Show resolved Hide resolved
@JaylinYu JaylinYu merged commit 697433e into master Nov 16, 2023
86 of 88 checks passed
@JaylinYu JaylinYu deleted the moi_signal branch November 16, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants