From f8c66dce4c4a974df2a37e7aa50fd784a04a2c08 Mon Sep 17 00:00:00 2001 From: Fred Gu Date: Fri, 18 Jul 2025 10:05:16 +0800 Subject: [PATCH] [fix]stop respawning on macOS, align with Windows behavior --- framework/fit/python/fitframework/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/fit/python/fitframework/__init__.py b/framework/fit/python/fitframework/__init__.py index 4a1c32d7..a8ec7680 100644 --- a/framework/fit/python/fitframework/__init__.py +++ b/framework/fit/python/fitframework/__init__.py @@ -212,9 +212,9 @@ def main(): if __package__ == 'fitframework' and sys.argv[0].find("pytest") == -1: # 避免执行两次main - if platform.system() == 'Windows': + if platform.system() in ('Windows', 'Darwin'): # Windows 或 macOS main() - else: + else: # Linux 及其他 while True: main_process = Process(target=main, name='MainProcess') main_process.start()