Skip to content

Commit 3b292ad

Browse files
committed
[fix]stop respawning on macOS, align with Windows behavior
1 parent 2c561f2 commit 3b292ad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

framework/fit/python/fitframework/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,9 @@ def main():
212212

213213

214214
if __package__ == 'fitframework' and sys.argv[0].find("pytest") == -1: # 避免执行两次main
215-
if platform.system() == 'Windows':
215+
if platform.system() in ('Windows', 'Darwin'): # Windows 或 macOS
216216
main()
217-
else:
218-
while True:
217+
else: # Linux 及其他 while True:
219218
main_process = Process(target=main, name='MainProcess')
220219
main_process.start()
221220
main_process.join()

0 commit comments

Comments
 (0)