Kill exec process with SIGTERM instead of SIGKILL

Open
#21 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #22 by @inoc603 — closed without merging
  • #28 by @dqminh — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start at runc.go line 201, where runc.Exec uses exec.CommandContext, and compare the reported behavior with docker-runc and runc. The work is done when cancellation stops the runc command with SIGTERM and the exec process inside the container is also stopped.

Written by the indexing model from the issue text.

Description

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?

Dominant language
Go
Stars
177
Forks
84
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containerd/go-runc

All issues in containerd/go-runc

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.