Red Hat Bugzilla – Bug 201391
daemon() macro doesn't normalize the nicelevel
Last modified: 2014-03-16 23:01:14 EDT
Description of problem:
When upgrading packages on a production server, we find it desirable to "nice"
the update process. Unfortunately, this interacts poorly with the post-install
restart logic and the initscripts daemon logic. The attached patch changes
initscripts to treat NICELEVEL and the nicelevel argument to daemon() as
absolute nicelevels, and uses nice to adjust the level accordingly. It has an
unfortunate dependency on the coreutils /bin/nice SUSv3-compatible extension
which causes nice to return the process nicelevel if a command to execute is
Version-Release number of selected component (if applicable):
initscripts-8.38-1 and earlier.
Steps to Reproduce:
1. nice rpm -Uvh openssh*.rpm
2. ps -o command,nice -p $(pgrep -x sshd)
Created attachment 133656 [details]
patch to set the nicelevel explicitly
Unfortunately, setting it as absolutes changes the existing (documented)
behavior, so this can't be done as-is.