Scroll to navigation

SDL_GetProcessInput(3) SDL3 FUNCTIONS SDL_GetProcessInput(3)

NAME

SDL_GetProcessInput - Get the SDL_IOStream
associated with process standard input.

HEADER FILE

Defined in SDL3/SDL_process.h

SYNOPSIS

#include "SDL3/SDL.h"
SDL_IOStream* SDL_GetProcessInput(SDL_Process *process);

DESCRIPTION

The process must have been created with

SDL_CreateProcess () and pipe_stdio set to true, or with SDL_CreateProcessWithProperties () and

SDL_PROP_PROCESS_CREATE_STDIN_NUMBER set to SDL_PROCESS_STDIO_APP .

Writing to this stream can return less data than expected if the process hasn't read its input. It may be blocked waiting for its output to be read, so if you may need to call SDL_GetOutputStream () and read the output in parallel with writing input.

FUNCTION PARAMETERS

The process to get the input stream for.

RETURN VALUE

( SDL_IOStream
*) Returns the input stream or NULL on failure; call SDL_GetError () for more information.

THREAD SAFETY

It is safe to call this function from any thread.

AVAILABILITY

This function is available since SDL 3.1.3.

SEE ALSO

(3), SDL_CreateProcess(3), (3), SDL_CreateProcessWithProperties(3), (3), SDL_GetProcessOutput(3)

SDL 3.1.6 Simple Directmedia Layer