Kevin Tung | a2eb951 | 2025-05-05 18:28:56 +0800 | [diff] [blame] | 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); |