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

fluent-bit: modify hot reload handler (#8041) #8066

Open
wants to merge 1 commit into
base: 2.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/fluent-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ static void flb_signal_handler_status_line(struct flb_cf *cf_opts)
char s[] = "[engine] caught signal (";
time_t now;
struct tm *cur;
flb_ctx_t *ctx = flb_context_get();

now = time(NULL);
cur = localtime(&now);
Expand Down Expand Up @@ -609,9 +608,6 @@ static void flb_signal_handler(int signal)
#ifndef FLB_HAVE_STATIC_CONF
if (flb_bin_restarting == FLB_RELOAD_IDLE) {
flb_bin_restarting = FLB_RELOAD_IN_PROGRESS;
/* reload by using same config files/path */
flb_reload(ctx, cf_opts);
flb_bin_restarting = FLB_RELOAD_IDLE;
}
else {
flb_utils_error(FLB_ERR_RELOADING_IN_PROGRESS);
Expand Down Expand Up @@ -1396,12 +1392,18 @@ int flb_main(int argc, char **argv)
#ifdef FLB_SYSTEM_WINDOWS
flb_console_handler_set_ctx(ctx, cf_opts);
#endif
if (flb_bin_restarting == FLB_RELOAD_IN_PROGRESS) {
/* reload by using same config files/path */
flb_reload(ctx, cf_opts);
ctx = flb_context_get();
flb_bin_restarting = FLB_RELOAD_IDLE;
}
}

if (exit_signal) {
flb_signal_exit(exit_signal);
}
ret = config->exit_status_code;
ret = ctx->config->exit_status_code;

cf_opts = flb_cf_context_get();

Expand Down
Loading