15 ProcessChainEmpty = 1,
16 ProcessAlreadyInChain,
17 InvalidInputRedirection,
18 InvalidOutputRedirection,
19 UnsupportedInputRedirection,
20 UnsupportedOutputRedirection,
21 ArgumentCapacityExceeded,
22 EnvironmentCapacityExceeded,
38 WindowsGetExitCodeProcess,
41 PosixBuildResolveExecutablePath,
42 PosixDuplicateDescriptor,
43 PosixResetSignalHandlers,
44 PosixChangeWorkingDirectory,
45 WindowsSetHandleInformation,
47 WindowsRtlCloneUserProcess,
48 WindowsNtWaitForSingleObject,
49 WindowsResolveWorkingDirectory,
50 WindowsPrepareExecutableTransportPath,
51 WindowsPrepareWorkingDirectoryTransportPath,
52 WindowsNormalizeExecutablePath,
65 uint32_t nativeError = 0;
67 explicit constexpr ResultProcess(
bool valid =
true) : result(valid) {}
69 uint32_t nativeError = 0)
70 : result(Result::Error(ProcessResultCategory, error)), detail(detail), nativeError(nativeError)
74 template <
typename ResultLike>
75 constexpr ResultProcess(
const ResultLike& other) : result(other.toResult())
78 explicit constexpr operator bool()
const {
return static_cast<bool>(result); }
80 constexpr operator Result()
const {
return result; }
82 constexpr Result toResult()
const {
return result; }
83 constexpr bool isError(
ProcessError error)
const {
return result.isError(ProcessResultCategory, error); }