xref: /openbmc/phosphor-bmc-code-mgmt/common/include/utils.hpp (revision 7f2658989dd4e336712a0d373dc66937911b68eb)
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