From 3ddc0fcd9adc02dab942462c6d8b29a48bf6ace8 Mon Sep 17 00:00:00 2001 From: Mikhail Sokolovskiy Date: Mon, 20 Jun 2022 21:37:49 +0300 Subject: [PATCH] Create Popen::communicate overload for std::string --- subprocess.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprocess.hpp b/subprocess.hpp index 8ebac01..8fbbaa3 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -1298,6 +1298,11 @@ public: return res; } + std::pair communicate(const std::string& msg) + { + return communicate(msg.c_str(), msg.size()); + } + std::pair communicate(const std::vector& msg) { auto res = stream_.communicate(msg);