We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
spawn_restricted_if
Add a spawn_restricted_if method to the CommandExt that accepts an Option<Rules> and only spawns restricted if those rules are Some.
CommandExt
Option<Rules>
Some
Command::new("foo") .arg("bar") .spawn_restricted_if(optional_rules)
spawn_restricted_if is maybe not the greatest name. We may want to come up with something better.
This would allow us to get rid of some ghastly code:
let mut cmd = Command::new("foo"); cmd.current_dir(cwd); let output = if let Some(compile_rules) = compile_rules { cmd.spawn_restricted(compile_rules) } else { cmd.spawn() };
The text was updated successfully, but these errors were encountered:
prlimit
Successfully merging a pull request may close this issue.
Add a
spawn_restricted_if
method to theCommandExt
that accepts anOption<Rules>
and only spawns restricted if those rules areSome
.spawn_restricted_if
is maybe not the greatest name. We may want to come up with something better.This would allow us to get rid of some ghastly code:
The text was updated successfully, but these errors were encountered: