Browse Source

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
Sam Lantinga 3 months ago
parent
commit
e40d337a47
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/io/SDL_iostream.c

+ 1 - 1
src/io/SDL_iostream.c

@@ -502,7 +502,7 @@ static bool SDLCALL fd_flush(void *userdata, SDL_IOStatus *status)
         result = SDL_fdatasync(iodata->fd);
         result = SDL_fdatasync(iodata->fd);
     } while (result < 0 && errno == EINTR);
     } while (result < 0 && errno == EINTR);
 
 
-    if (result < 0) {
+    if (result < 0 && errno != EINVAL) {
         return SDL_SetError("Error flushing datastream: %s", strerror(errno));
         return SDL_SetError("Error flushing datastream: %s", strerror(errno));
     }
     }
     return true;
     return true;