| 217 | /// @param stdErr Process::StdErr::Ignore{}, Process::StdErr::Inherit{} or redirect stderr to String/Vector/Span |
| 218 | /// @returns Error if the requested executable doesn't exist / is not accessible / it cannot be executed |
| 219 | template <typename Out = StdOut, typename In = StdIn, typename Err = StdErr> |
| 220 | Result launch(Span<const StringSpan> cmd, Out&& stdOut = Out(), In&& stdIn = In(), Err&& stdErr = Err()) |
| 221 | { |
| 222 | SC_TRY(formatArguments(cmd)); |
| 223 | GrowableBuffer<typename TypeTraits::RemoveReference<Out>::type> gbOut = {stdOut}; |
| 224 | GrowableBuffer<typename TypeTraits::RemoveReference<In>::type> gbIn = {stdIn}; |
| 225 | GrowableBuffer<typename TypeTraits::RemoveReference<Err>::type> gbErr = {stdErr}; |
| 226 | return launch(StdOut(gbOut), StdIn(gbIn), StdErr(gbErr)); |
| 227 | } |
| 228 | |
| 229 | /// @brief Executes a child process with the given arguments, waiting (blocking) until it's fully finished |