Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl+C not passed to subprocesses properly #74

Closed
ReubenFrankel opened this issue Mar 3, 2023 · 0 comments · Fixed by #75
Closed

Ctrl+C not passed to subprocesses properly #74

ReubenFrankel opened this issue Mar 3, 2023 · 0 comments · Fixed by #75

Comments

@ReubenFrankel
Copy link
Contributor

ReubenFrankel commented Mar 3, 2023

Background

I have a used the EDK to build an extension (matatika_extension) that wraps Docker Compose.
I am using Python 3.7 on Ubuntu 22.04 LTS.

Expected behaviour

When I run matatika_extension invoke up (alias for docker compose up) and then cancel the process with Ctrl+C, I expect to see the procedure that stops the service containers.

^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...
[+] Running 3/3
 ⠿ Container matatika-ext-app-1      Stopped                                                                                                                           10.1s
 ⠿ Container matatika-ext-catalog-1  Stopped                                                                                                                           10.4s
 ⠿ Container matatika-ext-db-1       Stopped                                                                                                                            0.1s
canceled

Actual behaviour

Containers are not stopped once started before the extension process was cancelled (visible with docker ps). Cancelling the process immediately exits with the following message:

^C/home/linuxbrew/.linuxbrew/opt/python@3.7/lib/python3.7/asyncio/unix_events.py:878: RuntimeWarning: A loop is being detached from a child watcher with pending handlers
  RuntimeWarning)

Aborted!

Potential solution(s)

It seems like the SIGINT signal from Ctrl+C is not being passed the subprocess. Propagating this may fix the issue.

@ReubenFrankel ReubenFrankel changed the title Ctrl +C not passed to subprocesses properly Ctrl+C not passed to subprocesses properly Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant