| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <errno.h> | 5 #include <errno.h> |
| 6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <sys/file.h> | 7 #include <sys/file.h> |
| 8 | 8 |
| 9 #include "chrome/browser/process_singleton.h" | 9 #include "chrome/browser/process_singleton.h" |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 LOG(ERROR) << "Unable to obtain profile lock."; | 103 LOG(ERROR) << "Unable to obtain profile lock."; |
| 104 return false; | 104 return false; |
| 105 } | 105 } |
| 106 | 106 |
| 107 return true; | 107 return true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 void ProcessSingleton::Cleanup() { | 110 void ProcessSingleton::Cleanup() { |
| 111 // Closing the file also releases the lock. | 111 // Closing the file also releases the lock. |
| 112 if (lock_fd_ != -1) { | 112 if (lock_fd_ != -1) { |
| 113 int rc = HANDLE_EINTR(close(lock_fd_)); | 113 int rc = IGNORE_EINTR(close(lock_fd_)); |
| 114 DPCHECK(!rc) << "Closing lock_fd_:"; | 114 DPCHECK(!rc) << "Closing lock_fd_:"; |
| 115 } | 115 } |
| 116 lock_fd_ = -1; | 116 lock_fd_ = -1; |
| 117 } | 117 } |
| OLD | NEW |