From 635727452cf1d51ee3efb49d7475195d0622cabf Mon Sep 17 00:00:00 2001 From: Anant Kishor Sharma Date: Tue, 18 Aug 2026 16:01:29 +0530 Subject: [PATCH] [agent] Use std::_Exit() to avoid EventBase double-drive on HwAgent exit --- fboss/agent/HwAgentMain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fboss/agent/HwAgentMain.cpp b/fboss/agent/HwAgentMain.cpp index 45776236c5b2f..cc9937cb746cd 100644 --- a/fboss/agent/HwAgentMain.cpp +++ b/fboss/agent/HwAgentMain.cpp @@ -36,6 +36,7 @@ #include "fboss/agent/hw/test/HwTestThriftHandler.h" #include +#include FOLLY_INIT_LOGGING_CONFIG("fboss=DBG2; default:async=true"); @@ -155,7 +156,8 @@ void SplitHwAgentSignalHandler::signalReceived(int /*signum*/) noexcept { XLOG(INFO) << "[Exit] Delay complete, exiting now"; } - exit(0); + // _Exit: skip global dtors that re-drive the live EventBase on warmboot exit. + std::_Exit(0); } int hwAgentMain(