summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 22:34:42 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 22:34:42 +0000
commit314667782d2b9226b0752878b7f2bd734814790f (patch)
tree443c06410272d9997c31a57f11d648004f9ad7ce
parenta697f4c60ddb3b400a2cf900aa9786cd49723da9 (diff)
downloadchromium_src-314667782d2b9226b0752878b7f2bd734814790f.zip
chromium_src-314667782d2b9226b0752878b7f2bd734814790f.tar.gz
chromium_src-314667782d2b9226b0752878b7f2bd734814790f.tar.bz2
Log an error message when deleting lockfile or socket fails in ProcessSingletonLinux.
Also, include full path in error about creating the lock. BUG=20982 TEST=chown your profile & lockfile to root.root and run. Should print error about unlink ... permission denied. Review URL: http://codereview.chromium.org/193105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26169 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/process_singleton_linux.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index be2fd39..db2d31d 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -226,8 +226,8 @@ std::string ReadLink(const std::string& path) {
// Unlink a path. Return true on success.
bool UnlinkPath(const std::string& path) {
int rv = unlink(path.c_str());
- if (rv < 0)
- DCHECK_EQ(errno, ENOENT);
+ if (rv < 0 && errno != ENOENT)
+ LOG(ERROR) << "Failed to unlink " << path << ": " << strerror(errno);
return rv == 0;
}
@@ -729,7 +729,8 @@ void ProcessSingleton::Create() {
// startup race.
// TODO(mattm): If the other instance is on the same host, we could try
// to notify it rather than just failing.
- LOG(FATAL) << "Failed to create SingletonLock: " << strerror(saved_errno);
+ LOG(FATAL) << "Failed to create " << lock_path_.value() << ": "
+ << strerror(saved_errno);
}
}