diff --git a/subprocess.hpp b/subprocess.hpp index 112038a..9fc1195 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -1130,6 +1130,17 @@ class Popen if (!defer_process_start_) execute_process(); } + template + Popen(std::vector vargs_, Args&& ...args):vargs_(vargs_) + { + init_args(std::forward(args)...); + + // Setup the communication channels of the Popen class + stream_.setup_comm_channels(); + + if (!defer_process_start_) execute_process(); + } + void start_process() noexcept(false); int pid() const noexcept { return child_pid_; }