diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index fb123208ac..f1648037c0 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -686,9 +686,12 @@ void sdlog2_start_log() pthread_attr_init(&logwriter_attr); struct sched_param param; + (void)pthread_attr_getschedparam(&logwriter_attr, ¶m); /* low priority, as this is expensive disk I/O */ param.sched_priority = SCHED_PRIORITY_DEFAULT - 40; - (void)pthread_attr_setschedparam(&logwriter_attr, ¶m); + if (pthread_attr_setschedparam(&logwriter_attr, ¶m)) { + warnx("sdlog2: failed setting sched params"); + } pthread_attr_setstacksize(&logwriter_attr, 2048);