mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Add implementation for From<Command> to CgroupPid
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
This commit is contained in:
@@ -279,6 +279,14 @@ impl From<u64> for CgroupPid {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a std::process::Child> for CgroupPid {
|
||||
fn from(u: &std::process::Child) -> CgroupPid {
|
||||
CgroupPid {
|
||||
pid: u.id() as u64,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl Subsystem {
|
||||
fn enter(self: Self, path: &String) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user