| 177 | |
| 178 | using StdErr = StdOut; |
| 179 | |
| 180 | struct StdIn : public StdStream |
| 181 | { |
| 182 | // clang-format off |
| 183 | struct Inherit{}; |
| 184 | |
| 185 | /// @brief Inherits child process Input from parent process |
| 186 | StdIn(GrowableBuffer<Inherit>) { operation = Operation::Inherit; } |
| 187 | StdIn(GrowableBuffer<StdIn>) { operation = Operation::Inherit; } |
| 188 | StdIn() { operation = Operation::Inherit; } |
| 189 | |
| 190 | /// @brief Fills standard input with content of a C-String |
| 191 | template <int N> StdIn(GrowableBuffer<const char [N]>& item) { operation = Operation::ReadableSpan; readableSpan = {item.content, N - 1}; } |
| 192 | |
| 193 | /// @brief Fills standard input with content of a StringSpan |
| 194 | StdIn(GrowableBuffer<StringSpan> string) { operation = Operation::ReadableSpan; readableSpan = string.content.toCharSpan();} |
| 195 | |
| 196 | /// @brief Fills standard input with content of a Span |
| 197 | StdIn(GrowableBuffer<Span<const char>> span) { operation = Operation::ReadableSpan; readableSpan = span.content;} |
| 198 | |
| 199 | using StdStream::StdStream; |
| 200 | friend struct ProcessChain; |
| 201 | // clang-format on |
| 202 | }; |
| 203 | |
| 204 | ProcessID processID; ///< ID of the process (can be the same as handle on Posix) |