We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6aba92d commit ca52e9cCopy full SHA for ca52e9c
1 file changed
src/mbpfan.c
@@ -32,6 +32,7 @@
32
#include <stdlib.h>
33
#include <unistd.h>
34
#include <string.h>
35
+#include <time.h>
36
#include <math.h>
37
#include <syslog.h>
38
#include <stdbool.h>
@@ -571,6 +572,11 @@ void mbpfan()
571
572
}
573
574
- sleep(polling_interval);
575
+ // call nanosleep instead of sleep to avoid rt_sigprocmask and
576
+ // rt_sigaction
577
+ struct timespec ts;
578
+ ts.tv_sec = polling_interval;
579
+ ts.tv_nsec = 0;
580
+ nanosleep(&ts, NULL);
581
582
0 commit comments