Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
kata_proxy: Set Setsid to true when exec kata-proxy
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
teawater committed May 23, 2019
1 parent 3d4729d commit 19115ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virtcontainers/kata_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 19115ef

Please sign in to comment.