| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- commit 4eea754dc37e6ac8ea1c57ed7fe4795cabd7ae36
- Author: Justin Kotalik <[email protected]>
- Date: Wed Mar 7 16:12:50 2018 -0800
- Don't create std log file for out of process when logs are disabled (#640)
- diff --git a/src/RequestHandler/outofprocess/serverprocess.cxx b/src/RequestHandler/outofprocess/serverprocess.cxx
- index 08ef028aef2..a14b4eafc6e 100644
- --- a/src/RequestHandler/outofprocess/serverprocess.cxx
- +++ b/src/RequestHandler/outofprocess/serverprocess.cxx
- @@ -980,6 +980,14 @@ SERVER_PROCESS::SetupStdHandles(
-
- DBG_ASSERT(pStartupInfo);
-
- + if (!m_fStdoutLogEnabled)
- + {
- + pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
- + pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
- + pStartupInfo->hStdError = INVALID_HANDLE_VALUE;
- + pStartupInfo->hStdOutput = INVALID_HANDLE_VALUE;
- + return hr;
- + }
- if (m_hStdoutHandle != NULL && m_hStdoutHandle != INVALID_HANDLE_VALUE)
- {
- if (!CloseHandle(m_hStdoutHandle))
- @@ -1038,22 +1046,12 @@ SERVER_PROCESS::SetupStdHandles(
- goto Finished;
- }
-
- - if (m_fStdoutLogEnabled)
- - {
- - pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
- - pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
- - pStartupInfo->hStdError = m_hStdoutHandle;
- - pStartupInfo->hStdOutput = m_hStdoutHandle;
- - // start timer to open and close handles regularly.
- - m_Timer.InitializeTimer(STTIMER::TimerCallback, &m_struFullLogFile, 3000, 3000);
- - }
- - else
- - { // only enable stderr
- - pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
- - pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
- - pStartupInfo->hStdError = m_hStdoutHandle;
- - pStartupInfo->hStdOutput = INVALID_HANDLE_VALUE;
- - }
- + pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
- + pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
- + pStartupInfo->hStdError = m_hStdoutHandle;
- + pStartupInfo->hStdOutput = m_hStdoutHandle;
- + // start timer to open and close handles regularly.
- + m_Timer.InitializeTimer(STTIMER::TimerCallback, &m_struFullLogFile, 3000, 3000);
-
- Finished:
- if (FAILED(hr))
|