Skip to content

Commit 50408e7

Browse files
committed
proc_loadavg: Sleep in loadavg thread should not slow down reloads
The thread might be sleeping. Make sure to interrupt so we can reload faster. Signed-off-by: Deyan Doychev <[email protected]>
1 parent 42b57f2 commit 50408e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/proc_loadavg.c

+1
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ int stop_load_daemon(pthread_t pid)
677677
/* Signal the thread to gracefully stop */
678678
loadavg_stop = 1;
679679

680+
pthread_kill(pid, SIGUSR1);
680681
s = pthread_join(pid, NULL); /* Make sure sub thread has been canceled. */
681682
if (s)
682683
return log_error(-1, "stop_load_daemon error: failed to join");

0 commit comments

Comments
 (0)