I\'m maintaining a number of console applications at work and one thing I\'ve been noticing in a number of them is that they call Environment.Exit(0).
A sample progr
In .net core, as of right now, one must use Environment.Exit
to terminate their program on Mac. Purely returning from main
doesn't stop the process and it keeps running until the user aborts it. Patterns like:
public class Program
{
public static void Main(string[] args)
{
Environment.Exit(TryRun(args));
}
}
are common in my work place because we want to ship for both Windows and Mac.