[337] Add logic to run child processes nicer than parent#133
[337] Add logic to run child processes nicer than parent#133ionphractal wants to merge 4 commits intocloudfoundry:masterfrom
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.
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