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_ReadProcess - Read all the output from a process.

Availability

       This function is available since SDL 3.2.0.

Description

       If  a  process  was created with I/O enabled, you can use this function to read the output. This function
       blocks until the process is complete, capturing all output, and providing the process exit code.

       The data is allocated with a zero byte at the end (null terminated) for convenience. This extra  byte  is
       not included in the value reported via datasize.

       The data should be freed with SDL_free().

Function Parameters

process
              The process to read.

       datasize
              a pointer filled in with the number of bytes read, may be NULL.

       exitcode
              a pointer filled in with the process exit code if the process has exited, may be NULL.

Name

       SDL_ReadProcess - Read all the output from a process.

Return Value

       for more information.

See Also

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

Simple Directmedia Layer                           SDL 3.2.20                                 SDL_ReadProcess(3)

Synopsis

#include<SDL3/SDL_process.h>void*SDL_ReadProcess(SDL_Process*process,size_t*datasize,int*exitcode);

Thread Safety

       This function is not thread safe.

See Also