container
container copied to clipboard
[Bug]: Ctrl+C doesn't interrupt unpacking a built image
I have done the following
- [x] I have searched the existing issues
- [x] If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
- Build an image
- Press Ctrl+C when unpacking a built image
Current behavior
% container build --no-cache
[+] Building 606.1s (36/36) FINISHED
...
⠴ Unpacking built image for platform linux/arm64 12% (104.7/869.7 MB, Zero KB/s) [42s]
Expected behavior
^CError: interrupted: "exiting on signal 2"
Environment
- Container:
../container/bin/container --version
container CLI version 5090093 (build: debug, commit: 5090093)
Relevant log output
N/A
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
@dkovba Looks like the signal handler for Ctrl+C only covers the build phase, currently it is inside a task group that exits once builder.build() finishes.
Later unpack phase after that runs without any signal handling, so SIGINT just gets ignored. Wrapping the unpack logic in the same signal-handling scope should fix it.
lemme know if this make sense to you :)