From a1d3fc1f50e8f2587614822e9dcb08d615e861d8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 14 Sep 2025 12:11:05 -0700 Subject: [PATCH] Clarify why we ignore EINVAL when flushing a file descriptor --- src/io/SDL_iostream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/io/SDL_iostream.c b/src/io/SDL_iostream.c index d85c5777c9..df515b6df6 100644 --- a/src/io/SDL_iostream.c +++ b/src/io/SDL_iostream.c @@ -502,6 +502,7 @@ static bool SDLCALL fd_flush(void *userdata, SDL_IOStatus *status) result = SDL_fdatasync(iodata->fd); } while (result < 0 && errno == EINTR); + // We get EINVAL when flushing a pipe, just make that a no-op if (result < 0 && errno != EINVAL) { return SDL_SetError("Error flushing datastream: %s", strerror(errno)); }