fix: Windows gateway lifecycle — needsRunMode, taskkill cleanup, CLI awareness#624
Closed
a2735444 wants to merge 1 commit intoEKKOLearnAI:mainfrom
Closed
fix: Windows gateway lifecycle — needsRunMode, taskkill cleanup, CLI awareness#624a2735444 wants to merge 1 commit intoEKKOLearnAI:mainfrom
a2735444 wants to merge 1 commit intoEKKOLearnAI:mainfrom
Conversation
…awareness Three fixes bundled: 1. needsRunMode: Remove 'windows-service' from the exclude list. Windows scheduled tasks register a service but don't manage its runtime lifecycle, so gateway needs to run as a detached child process (like WSL/Docker). 2. stop() Windows process tree cleanup: Replace POSIX-only process.kill(-pid, 'SIGTERM') with taskkill /F /T /PID on Windows to properly kill detached gateway children. 3. hermes-cli.ts Windows awareness: Add isWindows check to startGateway()/restartGateway() so they use background run mode on Windows instead of calling gateway start/restart (which only registers scheduled tasks).
Owner
|
我正在兼容windows,马上就来 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows gateway lifecycle fixes
Fixes three issues affecting Windows:
1. needsRunMode excludes Windows
detectInitSystem() correctly returns 'windows-service' for Windows, but needsRunMode includes it in the exclude list, causing gateway start (scheduled task) instead of gateway run (detached child process).
2. stop() uses POSIX-only process group kill
On Windows, process.kill(-pid, 'SIGTERM') throws. Added taskkill /F /T /PID fallback.
3. hermes-cli.ts missing Windows background mode
Added isWindows check alongside isDocker for background gateway run.
Related: PR #623