Set scheduling policy before dropping privileges
authorSebastian Blunt <sebastian@c4k3.net>
Tue, 6 Dec 2016 17:11:14 +0000 (18:11 +0100)
committerSebastian Blunt <sebastian@c4k3.net>
Tue, 6 Dec 2016 17:11:14 +0000 (18:11 +0100)
commit1aa006c5960c17ccb941fc850b29d49cd5c6d1c3
tree124d83b5cb811134f968b42b6c78651a1f7fd527
parentfac630135664fda26338d403041b6b6e558a2d6b
Set scheduling policy before dropping privileges

Previously if set to daemonize, set to run with realtime priority, and
set to drop privileges, umurmur would try to set the scheduling policy
after dropping privileges, which would fail as unprivileged processes
are not allowed to set a realtime scheduling policy as of Linux 2.6.12.

Fixes #94.
src/main.c