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

dotnet run doesn't handle ctrl-c well #4779

Closed
stephentoub opened this issue Jan 12, 2016 · 10 comments
Closed

dotnet run doesn't handle ctrl-c well #4779

stephentoub opened this issue Jan 12, 2016 · 10 comments

Comments

@stephentoub
Copy link
Member

Porting issue https://github.com/dotnet/corefx/issues/5339...

Even if the app being run has a CancelKeyPress handler, the SIGINT generated by typing ctrl-C goes to the dotnet run process, killing it.

@jarroda
Copy link

jarroda commented Jul 26, 2016

Any progress on this issue?

@muratg
Copy link

muratg commented Oct 31, 2016

👁️

@TheRealPiotrP
Copy link
Contributor

https://github.com/dotnet/corefx/blob/3d3c8602a484d40c7729659525946b9c97a3a003/src/System.Console/tests/CancelKeyPress.cs

@jgoshi let's make sure that any time CLI spins off a process then we wire up passthrough similarly to how it's done in the CoreFx test above.

@jgoshi jgoshi assigned jgoshi and unassigned jgoshi Jan 4, 2017
@jgoshi
Copy link
Contributor

jgoshi commented Jan 10, 2017

@schellap Using the code sample provided in https://github.com/dotnet/corefx/issues/5339, I noticed that just calling dotnet exec directly I see the same problem. It appears that nothing in the app cancel handler gets written out (Console.Writeline doesn't work for some reason). I also notice that Debug.Fail("Attach") causes a crash as well (doesn't let me attach).

Any thoughts or suggestions?

@jgoshi
Copy link
Contributor

jgoshi commented Jan 17, 2017

@schellap Any insights?

@livarcocc
Copy link
Contributor

@gkhanna79 @ramarag can you guys help out here?

@gkhanna79
Copy link
Member

@livarcocc What specific thing are you looking for? This does not appear to be a host issue.

wli3 referenced this issue in wli3/cli Jul 14, 2017
@Mpdreamz
Copy link

This seems pretty important to the dotnet run experience, has there been any update on this ticket or anywhere related?

@livarcocc
Copy link
Contributor

I wish I could do a +1 on the close status change here.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 3.0.1xx milestone Jan 31, 2020
@Spongman
Copy link

does not work on linux if console output is piped.

$ dotnet run | tee -a /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests