mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
make pthread_mutex_unlock include the reason for why the unlock fails.
This commit is contained in:
parent
b31ef8cde5
commit
8ff8c66655
1 changed files with 5 additions and 4 deletions
|
@ -116,8 +116,9 @@ void BasicThread::Stop()
|
|||
|
||||
// Signal that it's ok for the thread to exit now by unlocking the
|
||||
// mutex.
|
||||
if ( pthread_mutex_unlock(&terminate) != 0 )
|
||||
reporter->FatalError("Failure flagging terminate condition for thread %s", name.c_str());
|
||||
int err = pthread_mutex_unlock(&terminate);
|
||||
if ( err != 0 )
|
||||
reporter->FatalError("Failure flagging terminate condition for thread %s: %s", name.c_str(), strerror(err));
|
||||
|
||||
terminating = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue