From 6336bd646a95f89be98d9918323860b545dafcd0 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Mon, 12 Aug 2019 06:55:12 +0200 Subject: MacGui: disable sudden termination in the xpc service when the core is created. --- macosx/HandBrakeXPCService/HandBrakeXPCService.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'macosx') 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 *)bookmarks -- cgit v1.2.3