Handle errors during pthread calls

Summary: Release locks before calling exit.

Test Plan: Force errors in debugger and verify correctness

Reviewers: igor, yhchiang, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D30423
This commit is contained in:
Venkatesh Radhakrishnan 2014-12-17 16:25:09 -08:00
parent 25f70a5abb
commit 7198ed5a2e
1 changed files with 1 additions and 1 deletions

View File

@ -1068,7 +1068,7 @@ class PosixFileLock : public FileLock {
void PthreadCall(const char* label, int result) {
if (result != 0) {
fprintf(stderr, "pthread %s: %s\n", label, strerror(result));
exit(1);
abort();
}
}