-
Notifications
You must be signed in to change notification settings - Fork 41
[337] Add logic to run child processes nicer than parent #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[337] Add logic to run child processes nicer than parent #133
Conversation
|
Thanks for picking this back up. With regards to testing, given that all logic sits in an external library, it would be best to only add an integration test which would write out a bash script in a temporary file and execute it once without the flag and once with the flag. The bash script could echo its own nice level. |
|
| Quiet bool | ||
|
|
||
| // Run command with a priority lower than the parent process | ||
| RunNicer bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there perhaps a better name for this field indicating what nicer means? From skimming the linked issue (and the comment!) but it would not be obvious to me from the method name here.
Maybe something like: “ReducePriority” or “SpawnWithLowerPriority” or something like that? I don’t have a great suggestion. I’m sure there’s a standard name for this thing but I can’t remember off the top of my head what it should be.
This PR is related to cloudfoundry/bosh-agent#337 but the logic resides in bosh-utils.
@rkoster
I would still need help with how to write the tests. What would need to be done?
Btw adding it to the bosh-agent would then just look like this? https://github.com/cloudfoundry/bosh-agent/compare/main...ionphractal:bosh-agent:337-nice-child-scripts?expand=1