Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 201391 - daemon() macro doesn't normalize the nicelevel
daemon() macro doesn't normalize the nicelevel
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2006-08-04 15:07 EDT by Bill Rugolsky, Jr.
Modified: 2014-03-16 23:01 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-16 20:02:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to set the nicelevel explicitly (870 bytes, patch)
2006-08-04 15:07 EDT, Bill Rugolsky, Jr.
no flags Details | Diff

  None (edit)
Description Bill Rugolsky, Jr. 2006-08-04 15:07:23 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
not specified.  

Version-Release number of selected component (if applicable):
initscripts-8.38-1 and earlier.

How reproducible:

Steps to Reproduce:
1. nice rpm -Uvh openssh*.rpm
2. ps -o command,nice -p $(pgrep -x sshd)
Actual results:
COMMAND                      NI
/usr/sbin/sshd               10

Expected results:
COMMAND                      NI
/usr/sbin/sshd                0

Additional info:
Comment 1 Bill Rugolsky, Jr. 2006-08-04 15:07:24 EDT
Created attachment 133656 [details]
patch to set the nicelevel explicitly
Comment 2 Bill Nottingham 2007-04-16 20:02:53 EDT
Unfortunately, setting it as absolutes changes the existing (documented)
behavior, so this can't be done as-is.

Note You need to log in before you can comment on or make changes to this bug.