Skip to content

Commit d200d70

Browse files
committed
remove async-signal-unsafe code from signal handler
1 parent 10a24b1 commit d200d70

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/fluent-bit.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -579,24 +579,9 @@ static void flb_signal_exit(int signal)
579579

580580
static void flb_signal_handler_status_line(struct flb_cf *cf_opts)
581581
{
582-
int len;
583-
char ts[32];
584582
char s[] = "[engine] caught signal (";
585-
time_t now;
586-
struct tm *cur;
587-
588-
now = time(NULL);
589-
cur = localtime(&now);
590-
len = snprintf(ts, sizeof(ts) - 1, "[%i/%02i/%02i %02i:%02i:%02i] ",
591-
cur->tm_year + 1900,
592-
cur->tm_mon + 1,
593-
cur->tm_mday,
594-
cur->tm_hour,
595-
cur->tm_min,
596-
cur->tm_sec);
597583

598584
/* write signal number */
599-
write(STDERR_FILENO, ts, len);
600585
write(STDERR_FILENO, s, sizeof(s) - 1);
601586
}
602587

0 commit comments

Comments
 (0)