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.
This commit is contained in:
Aareon Sullivan 2025-06-08 18:28:34 -05:00 committed by GitHub
parent 799bcfc7aa
commit 1db7ff42c5
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