Skip to content

Commit

Permalink
use Environment.ProcessId for current processId
Browse files Browse the repository at this point in the history
  • Loading branch information
WeihanLi authored Sep 16, 2024
1 parent 078c4e2 commit 96edceb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions source/Server/Common/Current.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

namespace SharpLab.Server.Common {
public static class Current {
public static readonly int ProcessId = ((Func<int>)(() => {
using (var current = Process.GetCurrentProcess()) {
return current.Id;
}
}))();
public static readonly int ProcessId = Environment.ProcessId;

public static readonly string AssemblyPath = typeof(Current).Assembly.GetAssemblyFile().FullName;
}
Expand Down

0 comments on commit 96edceb

Please sign in to comment.