logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_CreateProcess - Create a new process.

Availability

       This function is available since SDL 3.2.0.

Description

       The  path  to  the  executable  is supplied in args[0]. args[1..N] are additional arguments passed on the
       command line of the new process, and the argument list should be terminated with a NULL, e.g.:

              const char *args[] = { "myprogram", "argument", NULL };

       Setting pipe_stdio to true is equivalent to setting

       SDL_PROP_PROCESS_CREATE_STDIN_NUMBER and

       SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER  to  SDL_PROCESS_STDIO_APP  ,   and   will   allow   the   use   of
       SDL_ReadProcess () or

       SDL_GetProcessInput () and

       SDL_GetProcessOutput ().

       See SDL_CreateProcessWithProperties () for more details.

Function Parameters

args   the path and arguments for the new process.

       pipe_stdio
              true to create pipes to the process's standard input and from the process's standard output, false
              for the process to have no input and inherit the application's standard output.

Header File

       Defined in SDL3/SDL_process.h

Name

       SDL_CreateProcess - Create a new process.

Return Value

       ( SDL_Process
        *) Returns the newly created and running process, or NULL if the process couldn't be created.

See Also

(3),  SDL_CreateProcessWithProperties(3),  (3),  SDL_GetProcessProperties(3), (3), SDL_ReadProcess(3),
       (3),   SDL_GetProcessInput(3),   (3),   SDL_GetProcessOutput(3),   (3),   SDL_KillProcess(3),    (3),
       SDL_WaitProcess(3), (3), SDL_DestroyProcess(3)

Simple Directmedia Layer                           SDL 3.2.10                               SDL_CreateProcess(3)

Synopsis

#include"SDL3/SDL.h"SDL_Process*SDL_CreateProcess(constchar*const*args,boolpipe_stdio);

Thread Safety

       It is safe to call this function from any thread.

See Also