src/thread/pthread/SDL_syssem.c
changeset 1851 536b0704b7d8
parent 1630 eba962f9d603
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
--- a/src/thread/pthread/SDL_syssem.c	Wed May 17 18:57:04 2006 +0000
+++ b/src/thread/pthread/SDL_syssem.c	Wed May 17 23:42:48 2006 +0000
@@ -23,6 +23,7 @@
 
 #include <pthread.h>
 #include <semaphore.h>
+#include <errno.h>
 
 #include "SDL_thread.h"
 #include "SDL_timer.h"
@@ -86,7 +87,7 @@
 		return -1;
 	}
 
-	retval = sem_wait(&sem->sem);
+	while ( ((retval = sem_wait(&sem->sem)) == -1) && (errno == EINTR) ) {}
 	if ( retval < 0 ) {
 		SDL_SetError("sem_wait() failed");
 	}