Fix exit method to use sys.exit for proper cleanup

Change `RNS.__init__.py` exit method from `os._exit` to `sys.exit` to allow proper cleanup and exception handling. Keep `panic` method using `os._exit` for immediate termination in unrecoverable scenarios.

Resolves https://github.com/markqvist/Reticulum/issues/822
This commit is contained in:
Aareon Sullivan 2025-06-08 18:29:55 -05:00 committed by GitHub
commit 0c49d65c89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -382,7 +382,7 @@ def exit(code=0):
if not exit_called:
exit_called = True
Reticulum.exit_handler()
os._exit(code)
sys.exit(code)
class Profiler:
_ran = False
@ -541,4 +541,4 @@ class Profiler:
if tag["super"] == None:
print_results_recursive(tag, results)
profile = Profiler.get_profiler
profile = Profiler.get_profiler