Fix the netipmid process failed to start
It is not advisable to declare a local variable 'signals' in the
`setupSignal` method, as this can cause the netipmid process to exit
after the method completes execution.
Tested: Loading romulus in qemu and executing out of band ipmitool
successfully returns.
Change-Id: I3fb887db0ec2bfbc434e2a6d8b4f021748ba0a86
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/sd_event_loop.cpp b/sd_event_loop.cpp
index 537033d..c00b146 100644
--- a/sd_event_loop.cpp
+++ b/sd_event_loop.cpp
@@ -248,7 +248,7 @@
void EventLoop::setupSignal()
{
- boost::asio::signal_set signals(*io, SIGINT, SIGTERM);
+ static boost::asio::signal_set signals(*io, SIGINT, SIGTERM);
signals.async_wait([this](const boost::system::error_code& /* error */,
int /* signalNumber */) {
if (udpSocket)