aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/winapi/process.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-16 10:09:55 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-16 10:12:47 +0300
commita632bb8e796be52929f1541d305910d704e55076 (patch)
tree6a03b50fcb16ef1713f6cbbe5f2377b2fdc10990 /include/winapi/process.hpp
parentecho: make it really UTF-16 (diff)
downloadwinapi-common-a632bb8e796be52929f1541d305910d704e55076.tar.gz
winapi-common-a632bb8e796be52929f1541d305910d704e55076.zip
Process: support pipe redirection
Diffstat (limited to 'include/winapi/process.hpp')
-rw-r--r--include/winapi/process.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/winapi/process.hpp b/include/winapi/process.hpp
index d20ac38..22317ca 100644
--- a/include/winapi/process.hpp
+++ b/include/winapi/process.hpp
@@ -3,8 +3,11 @@
// For details, see https://github.com/egor-tensin/winapi-common.
// Distributed under the MIT License.
+#pragma once
+
#include "cmd_line.hpp"
#include "handle.hpp"
+#include "stream.hpp"
#include <utility>
@@ -12,7 +15,16 @@ namespace winapi {
class Process {
public:
+ struct IO {
+ process::Stdin std_in;
+ process::Stdout std_out;
+ process::Stderr std_err;
+
+ void close();
+ };
+
static Process create(const CommandLine&);
+ static Process create(const CommandLine&, IO);
void wait();