From 7198ed5a2ed6285123b374af78f36a440469eef6 Mon Sep 17 00:00:00 2001 From: Venkatesh Radhakrishnan Date: Wed, 17 Dec 2014 16:25:09 -0800 Subject: [PATCH] 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 --- util/env_posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/env_posix.cc b/util/env_posix.cc index 30997a904..da090ddf5 100644 --- a/util/env_posix.cc +++ b/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(); } }