main.py: setpgrp() to prevent suddent termination

This commit is contained in:
Mykola Grymalyuk
2023-05-22 16:10:58 -06:00
parent 77da01dfb4
commit 80ea0cd217
2 changed files with 6 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
# OpenCore Legacy Patcher changelog # OpenCore Legacy Patcher changelog
## 0.6.7 ## 0.6.7
- Backend changes:
- Call `setpgrp()` to prevent app from being killed if parent process is killed (ie. LaunchAgents)
## 0.6.6 ## 0.6.6
- Implement option to disable ColorSync downgrade on HD 3000 Macs - Implement option to disable ColorSync downgrade on HD 3000 Macs

View File

@@ -1,5 +1,6 @@
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
import os
import sys import sys
import time import time
import logging import logging
@@ -46,6 +47,9 @@ class OpenCoreLegacyPatcher:
self.constants.wxpython_variant: bool = True self.constants.wxpython_variant: bool = True
# Ensure we live after parent process dies (ie. LaunchAgent)
os.setpgrp()
# Generate OS data # Generate OS data
os_data = os_probe.OSProbe() os_data = os_probe.OSProbe()
self.constants.detected_os = os_data.detect_kernel_major() self.constants.detected_os = os_data.detect_kernel_major()