-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
dotnet/corefx
#41768Description
Repro steps
- Install 3.0 RTM
dotnet new console- Replace Program.cs with the following:
using System;
namespace MacMinimal
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
System.Net.NetworkInformation.NetworkChange.NetworkAddressChanged += (sender, e) => {
};
}
}
}Expected Result
The process should exit.
Actual Result
The process does not exit.
Details
Thread dumps indicate that this line is the problem:
We believe that this Thread should be marked as background so it doesn't block the process exiting.
Real world cases
We found this when we noticed that applications which use AppInsights don't close when they would normally exit on a Mac. This isn't noticed normally because the normal workflow for AspNetCore apps is that when you want the server to exit you send Ctrl-C.
CC @danmosemsft @karelz @davidfowl
Reactions are currently unavailable