From def5c50960eea4c112647f88361a3ae7155901a8 Mon Sep 17 00:00:00 2001 From: egor-tensin Date: Tue, 4 Jul 2023 00:48:00 +0000 Subject: =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20egor-tensin/wina?= =?UTF-8?q?pi-common@0c196cbe8b4927c78c02b2c7312fc69a507db845=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process__io_8hpp_source.html | 145 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 process__io_8hpp_source.html (limited to 'process__io_8hpp_source.html') diff --git a/process__io_8hpp_source.html b/process__io_8hpp_source.html new file mode 100644 index 0000000..a7dc74b --- /dev/null +++ b/process__io_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + + +winapi_common: include/winapi/process_io.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
winapi_common +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
process_io.hpp
+
+
+
1 // Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com>
+
2 // This file is part of the "winapi-common" project.
+
3 // For details, see https://github.com/egor-tensin/winapi-common.
+
4 // Distributed under the MIT License.
+
5 
+
6 #pragma once
+
7 
+
8 #include "handle.hpp"
+
9 #include "path.hpp"
+
10 #include "pipe.hpp"
+
11 
+
12 #include <string>
+
13 #include <utility>
+
14 
+
15 namespace winapi {
+
16 namespace process {
+
17 
+
18 struct Stream {
+
19  Stream(Handle&& handle) : handle{std::move(handle)} {}
+
20 
+
21  Handle handle;
+
22 };
+
23 
+
25 struct Stdin : Stream {
+
27  Stdin();
+
29  explicit Stdin(const std::string& file);
+
31  explicit Stdin(const CanonicalPath& file);
+
33  explicit Stdin(Pipe&);
+
34 };
+
35 
+
37 struct Stdout : Stream {
+
39  Stdout();
+
41  explicit Stdout(const std::string& file);
+
43  explicit Stdout(const CanonicalPath& file);
+
45  explicit Stdout(Pipe&);
+
46 };
+
47 
+
49 struct Stderr : Stream {
+
51  Stderr();
+
53  explicit Stderr(const std::string& file);
+
55  explicit Stderr(const CanonicalPath& file);
+
57  explicit Stderr(Pipe&);
+
58 };
+
59 
+
61 struct IO {
+
62  IO() = default;
+
63 
+
64  void close();
+
65 
+
66  Stdin std_in;
+
67  Stdout std_out;
+
68  Stderr std_err;
+
69 };
+
70 
+
71 } // namespace process
+
72 } // namespace winapi
+
Absolute, canonical path.
Definition: path.hpp:13
+
HANDLE wrapper.
Definition: handle.hpp:25
+
Anonymous pipe wrapper.
Definition: pipe.hpp:15
+
Child process IO settings.
Definition: process_io.hpp:61
+
Redirect child process's stderr.
Definition: process_io.hpp:49
+ +
Redirect child process's stdin.
Definition: process_io.hpp:25
+ +
Redirect child process's stdout.
Definition: process_io.hpp:37
+ + +
+ + + + -- cgit v1.2.3