Sdk: `dotnet run` doesn't handle ctrl-c well

Created on 12 Jan 2016  路  9Comments  路  Source: dotnet/sdk

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.

Bug fit-n-finish

Most helpful comment

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

All 9 comments

Any progress on this issue?

:eye:

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.

@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?

@schellap Any insights?

@gkhanna79 @ramarag can you guys help out here?

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

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

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

Was this page helpful?
0 / 5 - 0 ratings