From 7af36d6c40659feff33df4bd8a87f76e43093540 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 14 Sep 2025 12:01:36 -0700 Subject: [PATCH] Ignore errors flushing output on POSIX pipes Fixes https://github.com/libsdl-org/SDL/issues/13116 Fixes https://github.com/libsdl-org/SDL/issues/13412 (cherry picked from commit e40d337a478cb0c278cc5866296b44542d2f191a) --- src/io/SDL_iostream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/SDL_iostream.c b/src/io/SDL_iostream.c index 989f3b9c4c..41748cf6d3 100644 --- a/src/io/SDL_iostream.c +++ b/src/io/SDL_iostream.c @@ -455,7 +455,7 @@ static bool SDLCALL fd_flush(void *userdata, SDL_IOStatus *status) result = SDL_fdatasync(iodata->fd); } while (result < 0 && errno == EINTR); - if (result < 0) { + if (result < 0 && errno != EINVAL) { return SDL_SetError("Error flushing datastream: %s", strerror(errno)); } return true;