runit: fix chpst -n -N -u USER
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 13 Mar 2017 21:32:05 +0000 (22:32 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 13 Mar 2017 21:35:30 +0000 (22:35 +0100)
commit018804204f41e6e60cec536843275f8fdd4d3620
tree8d1adfc3acba1cbfb24e952e12f1a329a3a15a21
parente88608eae24ae5934034e1ecb6c494fefbf1b9ae
runit: fix chpst -n -N -u USER

busybox's chpst first switches user/group and then tries to call nice().
Once the root priviledges are dropped, process priority can only be lowered.
So negative nice values don't work anymore.
Upstream version of chpst correctly calls nice() before switching user.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
runit/chpst.c