SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_WaitProcess

Wait for a process to finish.

Header File

Defined in <SDL3/SDL_process.h>

Syntax

bool SDL_WaitProcess(SDL_Process *process, bool block, int *exitcode);

Function Parameters

SDL_Process * process The process to wait for.
bool block If true, block until the process finishes; otherwise, report on the process' status.
int * exitcode a pointer filled in with the process exit code if the process has exited, may be NULL.

Return Value

(bool) Returns true if the process exited, false otherwise.

Remarks

This can be called multiple times to get the status of a process.

The exit code will be the exit code of the process if it terminates normally, a negative signal if it terminated due to a signal, or -255 otherwise. It will not be changed if the process is still running.

Thread Safety

This function is not thread safe.

Version

This function is available since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryProcess


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.