From 3bfa3b29c0515a9e77c7c69fe072b7ff2e0fc302 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Wed, 31 Jan 2024 12:18:03 -0800 Subject: Move to process v2 Boost process v2 brings some significant benefits to our launching of processes[1]. In bmcweb terms: 1. The code is radically simpler, which decreaeses compile times, and reduces the scope for code scanning tools. 2. The code now uses standard asio pipes instead of inventing its own. 3. Separate compilation. Tested: We don't have a lot of unit tests for the virtual media stuff that I can run, but we do have unit tests for credentials pipe, which in this change have been ported over, so the feature works. Unit tests are passing. [1] https://www.boost.org/doc/libs/1_80_0/doc/html/boost_process/v2.html#boost_process.v2.introduction Change-Id: Ia20226819d75ff6e492f8852185f0b73e8f5cf83 Signed-off-by: Ed Tanous --- redfish-core/lib/virtual_media.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'redfish-core') diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp index 529b9dc5d9..37fb2045c9 100644 --- a/redfish-core/lib/virtual_media.hpp +++ b/redfish-core/lib/virtual_media.hpp @@ -25,7 +25,6 @@ #include "registries/privilege_registry.hpp" #include "utils/json_utils.hpp" -#include #include #include #include @@ -470,7 +469,7 @@ inline void doMountVmLegacy(const std::shared_ptr& asyncResp, // Open pipe secretPipe = std::make_shared( crow::connections::systemBus->get_io_context()); - fd = secretPipe->fd(); + fd = secretPipe->releaseFd(); // Pass secret over pipe secretPipe->asyncWrite( -- cgit v1.2.3