sdlGetProcessInput function
Get the SDL_IOStream associated with process standard input.
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, if so you may need to call SDL_GetProcessOutput() and read the output in parallel with writing input.
\param process The process to get the input stream for. \returns the input stream or NULL on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
\sa SDL_CreateProcess \sa SDL_CreateProcessWithProperties \sa SDL_GetProcessOutput
extern SDL_DECLSPEC SDL_IOStream *SDLCALL SDL_GetProcessInput(SDL_Process *process)
Implementation
Pointer<SdlIoStream> sdlGetProcessInput(Pointer<SdlProcess> process) {
final sdlGetProcessInputLookupFunction = libSdl3.lookupFunction<
Pointer<SdlIoStream> Function(Pointer<SdlProcess> process),
Pointer<SdlIoStream> Function(
Pointer<SdlProcess> process)>('SDL_GetProcessInput');
return sdlGetProcessInputLookupFunction(process);
}