mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
kill process by session, and add timeout (#2608)
This commit is contained in:
@@ -539,6 +539,7 @@ fn chroot(
|
||||
cmd.env(k, v);
|
||||
}
|
||||
}
|
||||
nix::unistd::setsid().with_kind(ErrorKind::Lxc)?; // TODO: error code
|
||||
std::os::unix::fs::chroot(path)?;
|
||||
if let Some(uid) = user.as_deref().and_then(|u| u.parse::<u32>().ok()) {
|
||||
cmd.uid(uid);
|
||||
|
||||
Reference in New Issue
Block a user