IISIntegration 763 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. commit 4eea754dc37e6ac8ea1c57ed7fe4795cabd7ae36
  2. Author: Justin Kotalik <[email protected]>
  3. Date: Wed Mar 7 16:12:50 2018 -0800
  4. Don't create std log file for out of process when logs are disabled (#640)
  5. diff --git a/src/RequestHandler/outofprocess/serverprocess.cxx b/src/RequestHandler/outofprocess/serverprocess.cxx
  6. index 08ef028aef2..a14b4eafc6e 100644
  7. --- a/src/RequestHandler/outofprocess/serverprocess.cxx
  8. +++ b/src/RequestHandler/outofprocess/serverprocess.cxx
  9. @@ -980,6 +980,14 @@ SERVER_PROCESS::SetupStdHandles(
  10. DBG_ASSERT(pStartupInfo);
  11. + if (!m_fStdoutLogEnabled)
  12. + {
  13. + pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
  14. + pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
  15. + pStartupInfo->hStdError = INVALID_HANDLE_VALUE;
  16. + pStartupInfo->hStdOutput = INVALID_HANDLE_VALUE;
  17. + return hr;
  18. + }
  19. if (m_hStdoutHandle != NULL && m_hStdoutHandle != INVALID_HANDLE_VALUE)
  20. {
  21. if (!CloseHandle(m_hStdoutHandle))
  22. @@ -1038,22 +1046,12 @@ SERVER_PROCESS::SetupStdHandles(
  23. goto Finished;
  24. }
  25. - if (m_fStdoutLogEnabled)
  26. - {
  27. - pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
  28. - pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
  29. - pStartupInfo->hStdError = m_hStdoutHandle;
  30. - pStartupInfo->hStdOutput = m_hStdoutHandle;
  31. - // start timer to open and close handles regularly.
  32. - m_Timer.InitializeTimer(STTIMER::TimerCallback, &m_struFullLogFile, 3000, 3000);
  33. - }
  34. - else
  35. - { // only enable stderr
  36. - pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
  37. - pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
  38. - pStartupInfo->hStdError = m_hStdoutHandle;
  39. - pStartupInfo->hStdOutput = INVALID_HANDLE_VALUE;
  40. - }
  41. + pStartupInfo->dwFlags = STARTF_USESTDHANDLES;
  42. + pStartupInfo->hStdInput = INVALID_HANDLE_VALUE;
  43. + pStartupInfo->hStdError = m_hStdoutHandle;
  44. + pStartupInfo->hStdOutput = m_hStdoutHandle;
  45. + // start timer to open and close handles regularly.
  46. + m_Timer.InitializeTimer(STTIMER::TimerCallback, &m_struFullLogFile, 3000, 3000);
  47. Finished:
  48. if (FAILED(hr))