devcontainers / devcontainers/cli

devcontainer exec does not always propagate SIGTERM to docker exec

Open
#888 1 comment 0 reactions 1 assignee Claimed by @chrmarti View on GitHub
bug upstream
Dominant language
TypeScript
Stars
3k
Forks
457
Avg merge
13h 17m
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.