Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

signals - #1879

Merged
mat007 merged 1 commit into
docker-archive:mainfrom
ndeloof:signals
Sep 21, 2021
Merged

signals#1879
mat007 merged 1 commit into
docker-archive:mainfrom
ndeloof:signals

Conversation

@ndeloof

@ndeloof ndeloof commented Jul 2, 2021

Copy link
Copy Markdown
Collaborator

What I did
removed home-made signal forwarding. Signals are sent from console to the whole process group, so child processes also receive SIGINT.

note: tested on my Mac, Linux and Windows boxes.
works when used to run compose-cli => com.docker.cli => signal_test container as described by #1151
but doesn't work if a compose service is defined to use signal_test, and use compose run: Ctrl+C on console cancels the context and we can't see INT logged on console.

so this is at least a partial fix, will require further investigations

Related issue
expected to fix #1151 🤞

(not mandatory) A picture of a cute animal, if possible in relation with what you did

@github-actions github-actions Bot added the cli cli label Jul 2, 2021
@mat007

mat007 commented Jul 2, 2021

Copy link
Copy Markdown
Contributor

I can’t reproduce the initial issue on Windows with beta 4. Was it only a problem on Linux?

@ndeloof

ndeloof commented Jul 2, 2021

Copy link
Copy Markdown
Collaborator Author

Haven't tested initial issue on Windows, but have reproduced on Linux and Mac.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
ndeloof marked this pull request as ready for review July 13, 2021 08:39
@ndeloof
ndeloof requested review from lorenrh and ulyssessouza July 19, 2021 09:47
Comment thread cli/mobycli/exec.go
@mat007

mat007 commented Sep 3, 2021

Copy link
Copy Markdown
Contributor

/generate-artifacts

@mat007

mat007 commented Sep 3, 2021

Copy link
Copy Markdown
Contributor

@ndeloof it seems /generate-artifacts doesn’t work here?
Maybe because the PR had been created before it’s introduced?
Or was it deactivated because we’re in the process of moving to docker/compose ?

@ndeloof

ndeloof commented Sep 3, 2021

Copy link
Copy Markdown
Collaborator Author

generate-artifacts is for compose.v2 only, we haven't define a comparable workflow for compose-cli

@mat007 mat007 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Tested on both Mac and Windows (using the CLI from docker/cli#3302).

The OP repro does not work entirely properly on Windows, but it’s an issue with Docker CLI as bypassing compose-cli still exhibits it. I’ll have a look at fixing it there.
In a nutshell the first ctrl-c writes a single INT to the console, but then it appears to be all frozen and a second ctrl-c doesn’t show up. It does work properly if run with -it though.

@mat007
mat007 merged commit 8b76602 into docker-archive:main Sep 21, 2021
@mat007 mat007 mentioned this pull request Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cli cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control-C issues duplicate signals to container

4 participants