mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-06 15:14:40 +01:00
Merge pull request #3064 from lifupan/main
agent: fix the issue of missing create a new session for container
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user