Scroll to navigation

SDL_WaitProcess(3) SDL3 FUNCTIONS SDL_WaitProcess(3)

NAME

SDL_WaitProcess - Wait for a process to finish.

HEADER FILE

Defined in SDL3/SDL_process.h

SYNOPSIS

#include "SDL3/SDL.h"
bool SDL_WaitProcess(SDL_Process *process, bool block, int *exitcode);

DESCRIPTION

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.

FUNCTION PARAMETERS

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

RETURN VALUE

Returns true if the process exited, false otherwise.

THREAD SAFETY

This function is not thread safe.

AVAILABILITY

This function is available since SDL 3.1.3.

SEE ALSO

(3), SDL_CreateProcess(3), (3), SDL_CreateProcessWithProperties(3), (3), SDL_KillProcess(3), (3), SDL_DestroyProcess(3)

SDL 3.1.6 Simple Directmedia Layer