Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/core.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Cincura ↹ <jiri@cincura.net>2020-11-12 01:06:28 +0300
committerGitHub <noreply@github.com>2020-11-12 01:06:28 +0300
commitce0a0ef5bb3b77023ce3509fbc08aea729c208d4 (patch)
tree2452da1d859cb19ebdffd9979b9bfa86be83ed61 /samples
parent201c3ac54c25f1ee855e2ab7904738971ece2d55 (diff)
Simpler Linux check. (#5106)
Diffstat (limited to 'samples')
-rw-r--r--samples/dotnet-runtimeinfo/Program.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/dotnet-runtimeinfo/Program.cs b/samples/dotnet-runtimeinfo/Program.cs
index ed66f3fd..6c35e577 100644
--- a/samples/dotnet-runtimeinfo/Program.cs
+++ b/samples/dotnet-runtimeinfo/Program.cs
@@ -26,7 +26,7 @@ namespace RuntimeEnvironment
WriteLine($"{nameof(Environment.ProcessorCount)}: {Environment.ProcessorCount}");
WriteLine();
- if(RuntimeInformation.OSDescription.StartsWith("Linux") && Directory.Exists("/sys/fs/cgroup"))
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && Directory.Exists("/sys/fs/cgroup"))
{
WriteLine("**CGroup info**");
WriteLine($"cfs_quota_us: {ReadAllLines("/sys/fs/cgroup/cpu/cpu.cfs_quota_us")[0]}");