mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 09:13:29 +00:00
kata_proxy: Set Setsid to true when exec kata-proxy
There is an issue that ctrl-c stop vmcache server will stop all containers that its VM is created by it. The cause is kata-proxy and vmcache server use same tty, for example: ps -e | grep kata 3617 pts/5 00:00:00 kata-runtime 3636 pts/5 00:00:00 kata-proxy Ctrl-c will send signal to both kata-proxy and vmcache server. Then the containers that its VM is created by this vmcache server will quit with it. Set Setsid to true when exec kata-proxy to handle this issue. Fixes: #1726 Signed-off-by: Hui Zhu <teawater@hyper.sh>
This commit is contained in:
parent
3d4729d6b2
commit
19115ef5f1
@ -47,6 +47,9 @@ func (p *kataProxy) start(params proxyParams) (int, string, error) {
|
||||
}
|
||||
|
||||
cmd := exec.Command(args[0], args[1:]...)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
Setsid: true,
|
||||
}
|
||||
if err := cmd.Start(); err != nil {
|
||||
return -1, "", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user