From 379496a38f7324de1fd72fdf878f4647fe40f344 Mon Sep 17 00:00:00 2001 From: John Salem Date: Fri, 10 Jul 2020 18:14:32 -0700 Subject: [PATCH] Move printf in PauseOnStart (#39095) * Only print to the console from the runtime when PauseOnStart has waited long enough * Fix typo --- src/coreclr/src/vm/diagnosticserver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/vm/diagnosticserver.cpp b/src/coreclr/src/vm/diagnosticserver.cpp index 3cf9b57..a843cf3 100644 --- a/src/coreclr/src/vm/diagnosticserver.cpp +++ b/src/coreclr/src/vm/diagnosticserver.cpp @@ -270,13 +270,13 @@ void DiagnosticServer::PauseForDiagnosticsMonitor() if (dwDotnetDiagnosticsMonitorPauseOnStart != 0) { _ASSERTE(s_ResumeRuntimeStartupEvent != nullptr && s_ResumeRuntimeStartupEvent->IsValid()); - wprintf(W("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a server at '%s'.\n"), (LPWSTR)pDotnetDiagnosticsMonitorAddress); - fflush(stdout); STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command."); const DWORD dwFiveSecondWait = s_ResumeRuntimeStartupEvent->Wait(5000, false); if (dwFiveSecondWait == WAIT_TIMEOUT) { - STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command and has waitied 5 seconds."); + wprintf(W("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a server at '%s'.\n"), (LPWSTR)pDotnetDiagnosticsMonitorAddress); + fflush(stdout); + STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command and has waited 5 seconds."); const DWORD dwWait = s_ResumeRuntimeStartupEvent->Wait(INFINITE, false); } } -- 2.7.4