fix: guard Unix-only fcntl import and SIGKILL lookups - #5247
Closed
lars-hagen wants to merge 2 commits into
Closed
Conversation
lars-hagen
force-pushed
the
fix/windows-compat-fcntl-sigkill
branch
from
April 5, 2026 18:36
825420a to
f51b5cc
Compare
…r Windows compatibility
…race_period for Windows
lars-hagen
marked this pull request as ready for review
April 5, 2026 19:14
Collaborator
Collaborator
|
Implementation PR for #5246. |
Contributor
|
Closing as already fixed on Triage notes (high confidence): If you still see this on the latest version, please reopen with reproduction steps. (Bulk-closed during a CLI triage sweep.) |
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.
Summary
Applies existing defensive patterns to a few remaining Unix-specific call sites:
tools/memory_tool.pywith the samefcntl/msvcrtfallback already used inscheduler.pyandauth.pysignal.SIGKILLlookups withgetattr(signal, "SIGKILL", signal.SIGTERM)in 4 files. This only preventsAttributeErroron Windows; on Windows,os.kill(pid, SIGTERM)already performs forceful termination, so the runtime behavior is equivalent.No behavior change on Linux/macOS.
Fixes #5246
Testing
Tested on Windows 11 with Python 3.11, 3.12, and 3.13:
hermes doctorshows memory tool as available (nofcntlerror)python -c "import tools.memory_tool; print('OK')"succeedspytest tests/tools/test_memory_tool.py tests/tools/test_mcp_tool.py tests/hermes_cli/test_gateway.py tests/hermes_cli/test_profiles.py -vpasses (fixes 1 previously failing test, no regressions)