From 2ddef5179e104ca018a98d4bd520c2dd1500e676 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 18 Jun 2022 11:40:45 -0700 Subject: [PATCH] Bump initial installer message timeouts and declare daemon/agents as Interactive (#2162) --- Autoupdate/AppInstaller.m | 4 ++-- InstallerLauncher/SUInstallerLauncher.m | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Autoupdate/AppInstaller.m b/Autoupdate/AppInstaller.m index e6fa8648..e8e462c8 100644 --- a/Autoupdate/AppInstaller.m +++ b/Autoupdate/AppInstaller.m @@ -32,8 +32,8 @@ #include "AppKitPrevention.h" -#define FIRST_UPDATER_MESSAGE_TIMEOUT 7ull -#define RETRIEVE_PROCESS_IDENTIFIER_TIMEOUT 5ull +#define FIRST_UPDATER_MESSAGE_TIMEOUT 18ull +#define RETRIEVE_PROCESS_IDENTIFIER_TIMEOUT 8ull /** * Show display progress UI after a delay from starting the final part of the installation. diff --git a/InstallerLauncher/SUInstallerLauncher.m b/InstallerLauncher/SUInstallerLauncher.m index 179580f1..afe3a4bf 100644 --- a/InstallerLauncher/SUInstallerLauncher.m +++ b/InstallerLauncher/SUInstallerLauncher.m @@ -81,7 +81,8 @@ jobDictionary[@"EnableTransactions"] = @NO; jobDictionary[@"KeepAlive"] = @{@"SuccessfulExit" : @NO}; jobDictionary[@"RunAtLoad"] = @NO; - jobDictionary[@"NICE"] = @0; + jobDictionary[@"Nice"] = @0; + jobDictionary[@"ProcessType"] = @"Interactive"; jobDictionary[@"LaunchOnlyOnce"] = @YES; jobDictionary[@"MachServices"] = @{SPUStatusInfoServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}; @@ -277,7 +278,7 @@ } } - NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"KeepAlive" : @{@"SuccessfulExit" : @NO}, @"RunAtLoad" : @NO, @"Nice" : @0, @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}}; + NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"KeepAlive" : @{@"SuccessfulExit" : @NO}, @"RunAtLoad" : @NO, @"Nice" : @0, @"ProcessType": @"Interactive", @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}}; CFErrorRef submitError = NULL; #pragma clang diagnostic push