Skip to content

Commit 41c35b8

Browse files
committed
fix: Windows daemon hanging - replace sys.exit() with return in _start_windows_daemon()
1 parent 2f588ad commit 41c35b8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/omnipkg/isolation/worker_daemon.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,19 +1989,19 @@ def _start_windows_daemon(self, wait_for_ready: bool = False):
19891989
return False # Signal failure
19901990
else:
19911991
# Original "fire and forget" daemonization
1992-
time.sleep(2)
1992+
time.sleep(3)
19931993
if self.is_running():
19941994
safe_print(
19951995
_('✅ Daemon started successfully (PID: {})').format(process.pid),
19961996
file=sys.stderr,
19971997
)
1998-
sys.exit(0)
1998+
return True # FIX: Return instead of sys.exit() to avoid hanging on Windows
19991999
else:
20002000
safe_print(
20012001
_('❌ Daemon failed to start (check {})').format(DAEMON_LOG_FILE),
20022002
file=sys.stderr,
20032003
)
2004-
sys.exit(1)
2004+
return False # FIX: Return instead of sys.exit() to avoid hanging on Windows
20052005
except Exception as e:
20062006
safe_print(_('❌ Failed to start daemon: {}').format(e), file=sys.stderr)
20072007
import traceback

0 commit comments

Comments
 (0)