Skip to content

fix: Windows gateway lifecycle — needsRunMode, taskkill cleanup, CLI awareness#624

Closed
a2735444 wants to merge 1 commit intoEKKOLearnAI:mainfrom
a2735444:fix/windows-gateway-lifecycle
Closed

fix: Windows gateway lifecycle — needsRunMode, taskkill cleanup, CLI awareness#624
a2735444 wants to merge 1 commit intoEKKOLearnAI:mainfrom
a2735444:fix/windows-gateway-lifecycle

Conversation

@a2735444
Copy link
Copy Markdown

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

…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).
@EKKOLearnAI
Copy link
Copy Markdown
Owner

我正在兼容windows,马上就来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants