From 4dd4224c9701c98a912bfd84dfcd24be2ce47d38 Mon Sep 17 00:00:00 2001 From: "mattm@chromium.org" Date: Wed, 7 Apr 2010 02:21:15 +0000 Subject: Linux: fix startup race between creating the SingletonLock and listening on SingletonSocket. BUG=39922 TEST=see bug Review URL: http://codereview.chromium.org/1612006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43801 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_main.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'chrome/browser/browser_main.cc') diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 9d4b5c4..a993769 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -973,7 +973,14 @@ int BrowserMain(const MainFunctionParams& parameters) { if (CheckMachineLevelInstall()) return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; - process_singleton.Create(); + if (!process_singleton.Create()) { + LOG(ERROR) << "Failed to create a ProcessSingleton for your profile " + "directory. This means that running multiple instances " + "would start multiple browser processes rather than opening " + "a new window in the existing process. Aborting now to " + "avoid profile corruption."; + return ResultCodes::PROFILE_IN_USE; + } // Create the TranslateManager singleton. Singleton::get(); -- cgit v1.1