Support feeding the child process data on stdin

This commit is contained in:
Dennis Klein
2018-10-10 19:01:40 +02:00
committed by Dennis Klein
parent 9f325451e5
commit 3a1b769937
2 changed files with 21 additions and 7 deletions

View File

@@ -32,10 +32,13 @@ struct execute_result
* and exit code.
*
* @param[in] cmd Command to execute
* @param[in] log_prefix How to prefix each captured output line with
* @param[in] prefix How to prefix each captured output line with
* @param[in] input Data which is sent to stdin of the child process
* @return Captured stdout output and exit code
*/
execute_result execute(const std::string& cmd, const std::string& prefix = "");
execute_result execute(const std::string& cmd,
const std::string& prefix = "",
const std::string& input = "");
} /* namespace tools */
} /* namespace mq */