src/thread/pthread/SDL_syssem.c
changeset 11905 29bf3038a246
parent 11811 5d94cb6b24d3
child 12503 806492103856
     1.1 --- a/src/thread/pthread/SDL_syssem.c	Sun Feb 25 19:22:47 2018 +0200
     1.2 +++ b/src/thread/pthread/SDL_syssem.c	Sun Feb 25 19:51:34 2018 -0800
     1.3 @@ -91,7 +91,10 @@
     1.4          return SDL_SetError("Passed a NULL semaphore");
     1.5      }
     1.6  
     1.7 -    retval = sem_wait(&sem->sem);
     1.8 +    do {
     1.9 +        retval = sem_wait(&sem->sem);
    1.10 +    } while (retval < 0 && errno == EINTR);
    1.11 +
    1.12      if (retval < 0) {
    1.13          retval = SDL_SetError("sem_wait() failed");
    1.14      }