/*** Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: StartupParameters.hpp Date: 2022-1-29 Author: Reece ***/ #pragma once namespace Aurora::Processes { struct StartupParameters { AU_DEF(StartupParameters); AU_MOVE(StartupParameters); /** * @brief Relative or absolute path to the executable binary */ AuString process; /** * @brief Raw arguments (argv[1]...) */ AuList args; /** * @brief Child possession type */ enum ESpawnType type; /** * @brief Specifies the stdout handle of the child process */ EStreamForward fwdOut {}; /** * @brief Specifies the stderr handle of the child process */ EStreamForward fwdErr {}; /** * @brief Specifies the stdin handle of the child process */ EStreamForward fwdIn {}; /** * @brief Under Windows Console subsystem applications, this hides the conhost. */ bool bNoShowConsole {}; /** * @brief Starts the process in a resumable suspension mode */ bool bInDebugMode {}; AuOptional workingDirectory; AuList> environmentVariables; bool bInheritEnvironmentVariables { true }; IO::IOHandle handleOutStream; IO::IOHandle handleErrorStream; IO::IOHandle handleInputStream; AuOptionalEx optAffinity; AuSPtr pAutoJoinCompletionGroup; #if defined(AURORA_IS_MODERNNT_DERIVED) #if defined(CreateProcess) AuSupplierConsumer ntLikeHookCreateProcessW; AuConsumer<_SECURITY_ATTRIBUTES *> ntFixSharedHandleAttrs; #else AuSupplierConsumer ntLikeHookCreateProcessW; AuConsumer ntFixSharedHandleAttrs; #endif bool bForceNoJobParent {}; #endif #if defined(AURORA_IS_POSIX_DERIVED) AuVoidFunc posixApplySandboxCOW; AuVoidFunc posixPCA; AuVoidFunc posixPCB; #endif }; }