blob: 928b136b797549cebec965455a32ba6738955c4a [file] [log] [blame]
Kevin Tunga2eb9512025-05-05 18:28:56 +08001#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 */
11sdbusplus::async::task<bool> asyncSystem(sdbusplus::async::context& ctx,
12 const std::string& cmd);