summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 18:01:15 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 18:01:15 +0000
commita45f18300d227334e573e2fde960d1a181757c5a (patch)
treeb73ad051b23c0c1f8d6acb807731f1c2e5c8b867 /content
parent4ae98d51e5509e705b67d84d9c76956ac135ebd2 (diff)
downloadchromium_src-a45f18300d227334e573e2fde960d1a181757c5a.zip
chromium_src-a45f18300d227334e573e2fde960d1a181757c5a.tar.gz
chromium_src-a45f18300d227334e573e2fde960d1a181757c5a.tar.bz2
Exit cleanly when sending kZygoteMagic failed.
ChromeOS may kill chrome right after process starts (when a user closes lid right away for example), and sending magic number to browser process can fail. Instead of CHECK, exit normally on chromeos. BUG=chromium-os:17606 TEST=autotest will not crash with session manager sending SIGTERM Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93171 Review URL: http://codereview.chromium.org/7433011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/zygote_main_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc
index 6973cd8..bf72711 100644
--- a/content/browser/zygote_main_linux.cc
+++ b/content/browser/zygote_main_linux.cc
@@ -128,7 +128,8 @@ class Zygote {
// Exit normally on chromeos because session manager may send SIGTERM
// right after the process starts and it may fail to send zygote magic
// number to browser process.
- _exit(content::RESULT_CODE_NORMAL_EXIT);
+ if (!r)
+ _exit(content::RESULT_CODE_NORMAL_EXIT);
#else
CHECK(r) << "Sending zygote magic failed";
#endif