Merge pull request #3064 from lifupan/main

agent: fix the issue of missing create a new session for container
This commit is contained in:
Tim Zhang
2021-11-19 11:28:54 +08:00
committed by GitHub

View File

@@ -663,8 +663,8 @@ fn do_init_child(cwfd: RawFd) -> Result<()> {
let _ = unistd::close(crfd);
let _ = unistd::close(cwfd);
unistd::setsid().context("create a new session")?;
if oci_process.terminal {
unistd::setsid()?;
unsafe {
libc::ioctl(0, libc::TIOCSCTTY);
}