xref: /openbmc/phosphor-bmc-code-mgmt/common/include/utils.hpp (revision a2eb951f7384c2b4fa494f90e78295f615c12a56)
1 #pragma once
2 
3 #include <sdbusplus/async.hpp>
4 
5 /**
6  * @brief Asynchronously executes a shell command.
7  * @param ctx Async context for monitoring the pipe.
8  * @param cmd Shell command to execute.
9  * @return Task resolving to true on success (exit code 0), false otherwise.
10  */
11 sdbusplus::async::task<bool> asyncSystem(sdbusplus::async::context& ctx,
12                                          const std::string& cmd);
13