Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1306)

Unified Diff: rlz/mac/lib/rlz_value_store_mac.mm

Issue 10827449: mac/rlz: Correctly check for fd existence (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: rlz/mac/lib/rlz_value_store_mac.mm
diff --git a/rlz/mac/lib/rlz_value_store_mac.mm b/rlz/mac/lib/rlz_value_store_mac.mm
index 11a3c3d0f0a5caba87596bad5b08b00acbef3387..b1d082d12e4da259355b7aba13894cd12e986cf6 100644
--- a/rlz/mac/lib/rlz_value_store_mac.mm
+++ b/rlz/mac/lib/rlz_value_store_mac.mm
@@ -296,7 +296,7 @@ bool RecursiveCrossProcessLock::TryGetCrossProcessLock(
}
void RecursiveCrossProcessLock::ReleaseLock() {
- if (file_lock_) {
+ if (file_lock_ != -1) {
ignore_result(HANDLE_EINTR(flock(file_lock_, LOCK_UN)));
ignore_result(HANDLE_EINTR(close(file_lock_)));
file_lock_ = -1;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698