-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement chcpu
#226
base: main
Are you sure you want to change the base?
Implement chcpu
#226
Conversation
in general, to test such things, you either try to mock up |
@sylvestre Thanks for the review, I'll implement your suggestions a bit later. Since we're on the topic of deduping: there's some code here that's copy-pasted from my work on |
This PR implements pretty much the entirety of
chcpu
.Some things still missing:
chcpu
should return a non-zero exit code in some edge cases. This implementation does check for most such cases, but pretty much always returns a success exit-code. I'm guessing thatuucore::error::UResult
can be used to solve this somehow without having to manually callstd::process::exit()
.