When using QSystemSemaphore to solve producer-consumer communication between two processes. After 32767 acquire operations, the semaphore stops working. Try to acquire this semaphore 32768-th time returns false with error QSystemSemaphore::OutOfResources.
Attached is an example that reproduces the problem.
Create two instances of the application, one started with c and one with p (for producer and consumer).