From 1db7ff42c53a0497c68f593097a8af9095b328ef Mon Sep 17 00:00:00 2001 From: Aareon Sullivan Date: Sun, 8 Jun 2025 18:28:34 -0500 Subject: [PATCH] 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. --- RNS/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/__init__.py b/RNS/__init__.py index 9845264..6581fce 100755 --- a/RNS/__init__.py +++ b/RNS/__init__.py @@ -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 \ No newline at end of file +profile = Profiler.get_profiler