private void HandleProcessExit(object sender, EventArgs e) { // NOTE: We need to minimize the amount of processing occurring on this code path -- we only have under approx 2-3 seconds before process exit will occur logger.Warn(ErrorCode.Runtime_Error_100220, "Process is exiting"); TraceLogger.Flush(); try { lock (lockable) { if (SystemStatus.Current != SystemStatus.Running) { return; } SystemStatus.Current = SystemStatus.Stopping; } if (!TestHookup.ExecuteFastKillInProcessExit) { return; } logger.Info(ErrorCode.SiloStopping, "Silo.HandleProcessExit() - starting to FastKill()"); FastKill(); } finally { TraceLogger.Close(); } }