[Merge] lp:~vorlon/upstart/default-priority-not-always-zero into lp:upstart

Steve Langasek steve.langasek at canonical.com
Fri Dec 14 20:00:28 UTC 2012


Thanks for the review, James.  You're right that my proposed solution falls a bit short.  I think there are still some issues with your counterproposal as well, though:

 - a non-root session init process may have CAP_SYS_NICE set, in which case 'nice' settings in the job which raise the priority should be honored.
 - For root, if getpriority() != 0 and class->nice == 0, it's impossible to distinguish between a default and an explicitly-configured 'nice 0'.  For the first, we should not be resetting the priority; for the second, we should be setting it.

and a lower-priority issue:

 - If the user session has a positive getpriority() value n, and a job foo has a 'nice' option m such that 0 < m < n, foo will be started with the same priority as all the other jobs, whereas it's likely the *intent* was to start it with a nice level m *higher* than the session (i.e., base+m where base is normally 0).

I'll put together a fix addressing the first two points (as well as the other points you brought up), then take the last to upstart-devel for discussion as it requires a syntax change.
-- 
https://code.launchpad.net/~vorlon/upstart/default-priority-not-always-zero/+merge/134799
Your team Upstart Reviewers is subscribed to branch lp:upstart.



More information about the upstart-devel mailing list