summaryrefslogtreecommitdiffstats
path: root/chrome/common/service_process_util_mac.mm
diff options
context:
space:
mode:
authorscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 13:09:31 +0000
committerscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 13:09:31 +0000
commit466181625041e11870657e816a337f33402aab3f (patch)
tree8b215621a83072c05cb191143f65791b40b077cb /chrome/common/service_process_util_mac.mm
parentb04cc78a7f6f0ef8e8d7d15033cd19e5c32c579a (diff)
downloadchromium_src-466181625041e11870657e816a337f33402aab3f.zip
chromium_src-466181625041e11870657e816a337f33402aab3f.tar.gz
chromium_src-466181625041e11870657e816a337f33402aab3f.tar.bz2
Mac only: Change launchd type of service process.
There seems to be a (long-standing) issue where launchd agents marked for the 'Background' session type still get a terminate when the user logs out, but don't get re-launched when the user logs in (the entry doesn't get unloaded from launchctl on log-out, so the launch on load isn't effective). This works around that problem by changing the session type to Aqua, so launchctl does indeed unload the service process when the user logs out, and re-loads it when the user logs back in again. This is one workaround to the bug, the bug contains the other possible (more heavyweight) one - I think this one is correct for the current service process usages. BUG=88954 TEST=Enable cloud print proxy on Mac, reboot, log in, check for service process, log out, in again, check for service process. Should still be running. Repeat log out/log in again to be sure. Review URL: http://codereview.chromium.org/7336001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_mac.mm')
-rw-r--r--chrome/common/service_process_util_mac.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index b5b4f1d6..58bcc4a 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -33,7 +33,10 @@ using ::base::files::FilePathWatcher;
namespace {
-#define kServiceProcessSessionType "Background"
+// TODO(scottbyer): Determine if we really need to go back to "Background", and
+// subclass NSApplication to prevent -terminate from calling exit() in that
+// case. http://crbug.com/88954
+#define kServiceProcessSessionType "Aqua"
CFStringRef CopyServiceProcessLaunchDName() {
base::mac::ScopedNSAutoreleasePool pool;