xrootd/xrootd — pull request #3 by jussy (2013-04-10 15:39:25+00:00)
Title: Use scoped lock inside mac-specific XrdSysSemaphore implementation to avoid deadlock on thread cancellation

If a thread is waiting inside XrdSysCondVar::Wait and the thread is cancelled, the mutex is not released, therefore causing deadlock when other threads attempt to lock it.

The simple fix is to use a scoped lock to ensure the mutex is unlocked in the destructor if the thread is cancelled.