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
main
Venkatesh Radhakrishnan 10 years ago
parent 25f70a5abb
commit 7198ed5a2e
  1. 2
      util/env_posix.cc

@ -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();
}
}

Loading…
Cancel
Save