mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-22 13:36:18 +02:00
Fix setting the process priority
This commit is contained in:
parent
be40e66c63
commit
446b22ac85
1 changed files with 2 additions and 2 deletions
|
@ -284,11 +284,11 @@ int main(int argc, char** argv)
|
|||
group = user_group[1];
|
||||
}
|
||||
daemon = std::make_unique<Daemon>(user, group, pidFile);
|
||||
LOG(NOTICE, LOG_TAG) << "daemonizing" << std::endl;
|
||||
daemon->daemonize();
|
||||
processPriority = std::min(std::max(-20, processPriority), 19);
|
||||
if (processPriority != 0)
|
||||
setpriority(PRIO_PROCESS, 0, processPriority);
|
||||
LOG(NOTICE, LOG_TAG) << "daemonizing" << std::endl;
|
||||
daemon->daemonize();
|
||||
LOG(NOTICE, LOG_TAG) << "daemon started" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue