소스 검색

Clarify why we ignore EINVAL when flushing a file descriptor

Sam Lantinga 1 일 전
부모
커밋
a1d3fc1f50
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/io/SDL_iostream.c

+ 1 - 0
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));
     }