MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / launch

Function launch

Libraries/Process/Process.h:219–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

execFunction · 0.85

Calls 2

StdOutClass · 0.85
StdInClass · 0.85

Tested by

no test coverage detected