process topic

CategoryProcess

Process control support.

These functions provide a cross-platform way to spawn and manage OS-level processes.

You can create a new subprocess with SDL_CreateProcess() and optionally read and write to it using SDL_ReadProcess() or SDL_GetProcessInput() and SDL_GetProcessOutput(). If more advanced functionality like chaining input between processes is necessary, you can use SDL_CreateProcessWithProperties().

You can get the status of a created process with SDL_WaitProcess(), or terminate the process with SDL_KillProcess().

Don't forget to call SDL_DestroyProcess() to clean up, whether the process process was killed, terminated on its own, or is still running!

Functions

sdlCreateProcess(Pointer<Pointer<Int8>> args, bool pipeStdio) Pointer<SdlProcess> process
Create a new process.
sdlCreateProcessWithProperties(int props) Pointer<SdlProcess> process
Create a new process with the specified properties.
sdlDestroyProcess(Pointer<SdlProcess> process) → void process
Destroy a previously created process object.
sdlGetProcessInput(Pointer<SdlProcess> process) Pointer<SdlIoStream> process
Get the SDL_IOStream associated with process standard input.
sdlGetProcessOutput(Pointer<SdlProcess> process) Pointer<SdlIoStream> process
Get the SDL_IOStream associated with process standard output.
sdlGetProcessProperties(Pointer<SdlProcess> process) int process
Get the properties associated with a process.
sdlKillProcess(Pointer<SdlProcess> process, bool force) bool process
Stop a process.
sdlReadProcess(Pointer<SdlProcess> process, Pointer<Uint32> datasize, Pointer<Int32> exitcode) Pointer<NativeType> process
Read all the output from a process.
sdlWaitProcess(Pointer<SdlProcess> process, bool block, Pointer<Int32> exitcode) bool process
Wait for a process to finish.