diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index 0faf16a2..d0041fd5 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -766,6 +766,10 @@ namespace IPC { DEBUG_MSG(DLVL_FAIL, "Creating semaphore failed: %s", strerror(errno)); return; } + if (!mySemaphore.tryWaitOneSecond()){ + WARN_MSG("Force unlocking sharedServer semaphore to prevent deadlock"); + } + mySemaphore.post(); semGuard tmpGuard(&mySemaphore); newPage(); }