Skip to content
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

std::process Cgroups? #31406

Closed
SethDusek opened this issue Feb 4, 2016 · 1 comment
Closed

std::process Cgroups? #31406

SethDusek opened this issue Feb 4, 2016 · 1 comment

Comments

@SethDusek
Copy link

Could it be possible to have cgroup support for std::process? Like a linux-specific trait so that you can limit certain things of processes for example:

Command::new("somecommand")
.arg("somearg")
.cgroup("somegroup:/somesubgroup")
.spawn()

It'd be really useful in certain stuff such as timeouts and memory limits, etc

@alexcrichton
Copy link
Member

Thanks for the report! A feature request to add support for cgroups (e.g. a platform-specific extension) currently belongs over in the rust-lang/rfcs repo, but you may also be interested in the recently-approved CommandExt::before_exec function which should allow this as well (e.g. arbitrary code execution following just before an exec.

If the before_exec doesn't work out, could you open an issue against rust-lang/rfcs? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants