-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SIGINT leaves dotnet processes running incorrectly. Causes problems on subsequent builds/runs. #7261
Comments
This is related to https://github.com/dotnet/corefx/issues/1838. We don't have a great mechanism for passing Ctrl+C to other processes at the moment... |
@piotrpMSFT I was wondering few times before - why do we need to have two processes running for dotnet run (one for dotnet run, the other for its child dotnet exec)? If we didn't have that, we would not have this issue with ctrl-c |
@janvorli CLI is designed to run code it doesn't ship out-of-proc wherever it can. This comes down to assembly binding. |
#4779 is likely related. |
@janvorli is there anything we can do here on the CLI side? Like @TheRealPiotrP stated, we can't really run the application in the CLI context, as that could lead to dependencies problems. |
@livarcocc I actually wonder why the child dotnet process doesn't receive the SIGINT from the CTRL-C. I've seen a stackoverflow post that was solving the opposite issue - how to make sure the child process does not receive the SIGINT so that the parent can wait for it to complete before it shuts down on the SIGINT (https://stackoverflow.com/questions/6803395/child-process-receives-parents-sigint). |
@colemickens, thanks again for reporting this issue to us. dotnet/cli#10720 has recently been merged which should make the SIGINT handling for all The behavior now is to wait for the child process to terminate before the parent I am closing this issue as I believe it to now be resolved. If you are able to reproduce this on a recent 3.0 SDK build (keep in mind it usually takes a day or two for a fix to show up in the nightly SDK builds due to we flow dependencies between multiple repositories), please reopen this issue! Thanks! |
Steps to reproduce
docker run .....
dotnet restore
dotnet run
ctrl-c
dotnet run
Expected behavior
Everything works because the relevant dotnet processes were stopped and can simply be started again.
Actual behavior
There are old dotnet processes lying around that I must kill manually:
I have to manually kill the processes that stick around.
If I just do
dotnet run
over and over, without editting files, it's fine, and then I wind up with numerousdotnet exec
processes hanging around.Environment data
dotnet --info
output:Note, I'm running this all in the docker container:
The text was updated successfully, but these errors were encountered: