Skip to content

Commit f4e3087

Browse files
committed
Fixed tryWait semaphore call
1 parent db511a6 commit f4e3087

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/shared_memory.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ namespace IPC {
231231
result = 0;
232232
}
233233
#else
234-
result = sem_trywait(mySem);
234+
do {
235+
result = sem_trywait(mySem);
236+
} while (result == -1 && errno == EINTR);
235237
#endif
236238
return (result == 0);
237239
}

0 commit comments

Comments
 (0)