In runc.Exec, here the exec command is created with exec.CommandContext, which will kill the runc command with os.Process.Kill when the context is done. And when runc is killed by SIGKILL, the exec process inside the container is not stopped. I think we should send SIGTERM manually to stop the runc command when we're doing exec.
I only tested this with docker-runc. Can anyone confirm whether it is the same with runc?
In
runc.Exec, here the exec command is created withexec.CommandContext, which will kill therunccommand withos.Process.Killwhen the context is done. And whenruncis killed bySIGKILL, the exec process inside the container is not stopped. I think we should sendSIGTERMmanually to stop therunccommand when we're doing exec.I only tested this with
docker-runc. Can anyone confirm whether it is the same withrunc?