summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-12 06:55:12 +0200
committerDamiano Galassi <[email protected]>2019-08-12 07:00:34 +0200
commit6336bd646a95f89be98d9918323860b545dafcd0 (patch)
tree96c65f347c1deac0381503617e4d21ab2b2d5148 /macosx
parent93bbc62c454274b8be23705e10438fc0ee31ac24 (diff)
MacGui: disable sudden termination in the xpc service when the core is created.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HandBrakeXPCService/HandBrakeXPCService.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/HandBrakeXPCService/HandBrakeXPCService.m b/macosx/HandBrakeXPCService/HandBrakeXPCService.m
index 7570f5fce..366326b69 100644
--- a/macosx/HandBrakeXPCService/HandBrakeXPCService.m
+++ b/macosx/HandBrakeXPCService/HandBrakeXPCService.m
@@ -71,12 +71,15 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext;
[self.core addObserver:self forKeyPath:@"state"
options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial
context:HandBrakeXPCServiceContext];
+
+ [NSProcessInfo.processInfo disableAutomaticTermination:@"Core started"];
}
- (void)tearDown
{
_core = nil;
[HBCore closeGlobal];
+ [NSProcessInfo.processInfo enableSuddenTermination];
}
- (void)provideResourceAccessWithBookmarks:(NSArray<NSData *> *)bookmarks