From: John Salem Date: Wed, 19 Jun 2019 17:31:05 +0000 (-0700) Subject: Change default transport name to align with spec (#315) X-Git-Tag: submit/tizen/20190813.035844~4^2^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c094c3534e39ae151dbc4302a279c6e53f202c97;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Change default transport name to align with spec (#315) resolves dotnet/coreclr#24859 --- diff --git a/src/Microsoft.Diagnostics.Tools.RuntimeClient/DiagnosticsIpc/IpcClient.cs b/src/Microsoft.Diagnostics.Tools.RuntimeClient/DiagnosticsIpc/IpcClient.cs index edbf6cc48..4958b2979 100644 --- a/src/Microsoft.Diagnostics.Tools.RuntimeClient/DiagnosticsIpc/IpcClient.cs +++ b/src/Microsoft.Diagnostics.Tools.RuntimeClient/DiagnosticsIpc/IpcClient.cs @@ -13,7 +13,7 @@ namespace Microsoft.Diagnostics.Tools.RuntimeClient.DiagnosticsIpc { public class IpcClient { - private static string DiagnosticPortPattern { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"^dotnetcore-diagnostic-(\d+)$" : @"^dotnetcore-diagnostic-(\d+)-(\d+)-socket$"; + private static string DiagnosticPortPattern { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"^dotnet-diagnostic-(\d+)$" : @"^dotnet-diagnostic-(\d+)-(\d+)-socket$"; private static string IpcRootPath { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"\\.\pipe\" : Path.GetTempPath(); @@ -28,7 +28,7 @@ namespace Microsoft.Diagnostics.Tools.RuntimeClient.DiagnosticsIpc { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - string pipeName = $"dotnetcore-diagnostic-{processId}"; + string pipeName = $"dotnet-diagnostic-{processId}"; var namedPipe = new NamedPipeClientStream( ".", pipeName, PipeDirection.InOut, PipeOptions.None, TokenImpersonationLevel.Impersonation); namedPipe.Connect((int)ConnectTimeoutMilliseconds); @@ -38,7 +38,7 @@ namespace Microsoft.Diagnostics.Tools.RuntimeClient.DiagnosticsIpc { string ipcPort = Directory.GetFiles(IpcRootPath) // Try best match. .Select(namedPipe => (new FileInfo(namedPipe)).Name) - .SingleOrDefault(input => Regex.IsMatch(input, $"^dotnetcore-diagnostic-{processId}-(\\d+)-socket$")); + .SingleOrDefault(input => Regex.IsMatch(input, $"^dotnet-diagnostic-{processId}-(\\d+)-socket$")); if (ipcPort == null) { throw new PlatformNotSupportedException($"Process {processId} not running compatible .NET Core runtime"); diff --git a/src/Microsoft.Diagnostics.Tools.RuntimeClient/Eventing/EventPipeClient.cs b/src/Microsoft.Diagnostics.Tools.RuntimeClient/Eventing/EventPipeClient.cs index 13ff42ff0..825e36746 100644 --- a/src/Microsoft.Diagnostics.Tools.RuntimeClient/Eventing/EventPipeClient.cs +++ b/src/Microsoft.Diagnostics.Tools.RuntimeClient/Eventing/EventPipeClient.cs @@ -19,7 +19,7 @@ namespace Microsoft.Diagnostics.Tools.RuntimeClient { public static class EventPipeClient { - private static string DiagnosticPortPattern { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"^dotnetcore-diagnostic-(\d+)$" : @"^dotnetcore-diagnostic-(\d+)-(\d+)-socket$"; + private static string DiagnosticPortPattern { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"^dotnet-diagnostic-(\d+)$" : @"^dotnet-diagnostic-(\d+)-(\d+)-socket$"; private static string IpcRootPath { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"\\.\pipe\" : Path.GetTempPath();