mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-09 15:03:07 -04:00
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:
commit
0c49d65c89
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue