-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
On rs_preview build 14905:
sudo apt-get install dotnet-dev-1.0.0-preview2-003121
dotnet new
Replace Program.cs with the following:
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var p = System.Diagnostics.Process.GetCurrentProcess();
Console.WriteLine(p.ProcessorAffinity);
p.ProcessorAffinity = (IntPtr)1;
}
}
}dotnet restore
dotnet run
On "real" Linux, this runs to completion. On Windows, I get a failure:
Unhandled Exception: System.ComponentModel.Win32Exception: Invalid argument
at System.Diagnostics.Process.set_ProcessorAffinityCore(IntPtr value)
at System.Diagnostics.Process.set_ProcessorAffinity(IntPtr value)
at ConsoleApplication.Program.Main(String[] args)
ProcessorAffinityCore is calling sched_setaffinity, which apparently fails.