devcontainer exec does not always propagate SIGTERM to docker exec

Open
#888 1 comment 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Sep 5, 2024.

Assessment

This issue has not been assessed yet.

Description

bug upstream

Steps to reproduce:

  • Run devcontainer exec without pty, for instance:
devcontainer exec --container-id 1234abcdefgh -- sleep infinity > /dev/null 2>&1
  • Check that on the host machine and inside the container you have infinity sleep process: ps -auxf |grep "infinity"
  • Interrupt devcontainer exec with SIGTERM, i.e. kill the process or just interrupt the terminal.
  • Check on the host machine the docker process is gone, but inside the container infinity sleep is dangling.

It seems docker exec is terminated without SIGTERM, leading to ungraceful termination.

Dominant language
TypeScript
Stars
3k
Forks
461
Avg merge
18m
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

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 devcontainers/cli

All issues in devcontainers/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.