* Reduce the priority of scanner and inotify threads so they don't preempt serving media.

This commit is contained in:
Justin Maggard
2009-03-18 19:28:21 +00:00
parent 06fb334cad
commit 935225e1a3
2 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,8 @@
#include <libgen.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#ifdef HAVE_INOTIFY_H
#include <sys/inotify.h>
#else
@ -534,7 +536,10 @@ start_inotify()
int length, i = 0;
char * esc_name = NULL;
char * path_buf = NULL;
if (setpriority(PRIO_PROCESS, 0, 15) == -1)
DPRINTF(E_WARN, L_INOTIFY, "Failed to reduce inotify thread priority\n");
fd = inotify_init();
if ( fd < 0 ) {