Skip to content
Snippets Groups Projects
Verified Commit e50395a4 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Tomas Krizek
Browse files

gc: fix flushing of messages to logs

There were the usual effects: very incorrect timestamps (even by days),
and I suspect we could even lose some logs completely.
parent 46fa2719
Branches
Tags
1 merge request!1009GC fixes
......@@ -6,6 +6,7 @@ Bugfixes
- hints module: NODATA answers also for non-address queries (!1005)
- tls: send alert to peer if handshake fails (!1007)
- cache: fix interaction between LMDB locks and preallocation (!1013)
- cache garbage collector: fix flushing of messages to logs (!1009)
Knot Resolver 5.1.1 (2020-05-19)
......
......@@ -56,6 +56,11 @@ static long get_nonneg_optarg()
int main(int argc, char *argv[])
{
printf("Knot Resolver Cache Garbage Collector v. %s\n", KR_CACHE_GC_VERSION);
if (setvbuf(stdout, NULL, _IONBF, 0) || setvbuf(stderr, NULL, _IONBF, 0)) {
fprintf(stderr, "Failed to to set output buffering (ignored): %s\n",
strerror(errno));
fflush(stderr);
}
signal(SIGTERM, got_killed);
signal(SIGKILL, got_killed);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment