Add some comments, clean ups

This commit is contained in:
badaix 2020-05-10 21:52:19 +02:00
parent 2a6360a832
commit 184254b35f
6 changed files with 13 additions and 13 deletions

View file

@ -271,10 +271,7 @@ int main(int argc, char** argv)
daemon = std::make_unique<Daemon>(user, group, pidFile);
LOG(NOTICE, LOG_TAG) << "daemonizing" << std::endl;
daemon->daemonize();
if (processPriority < -20)
processPriority = -20;
else if (processPriority > 19)
processPriority = 19;
processPriority = std::min(std::max(-20, processPriority), 19);
if (processPriority != 0)
setpriority(PRIO_PROCESS, 0, processPriority);
LOG(NOTICE, LOG_TAG) << "daemon started" << std::endl;