fix: cross-platform signal handling for Windows#8
Conversation
SIGHUP doesn't exist on Windows, causing compilation failure. Extract signal list into platform-specific files using Go build tags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughExtracts platform-specific signal lists from the injector into build-tagged files ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@internal/injector/signals_windows.go`:
- Line 10: The signals slice currently includes syscall.SIGTERM which cannot be
forwarded to child processes on Windows; update the signals declaration
(signals) to either remove syscall.SIGTERM on Windows or add a clear comment
explaining that SIGTERM is only used for console shutdown notifications and will
not be forwarded by cmd.Process.Signal (so forwarding attempts will fail/return
an error); ensure the change references the signals variable and notes behavior
of cmd.Process.Signal to make the platform limitation explicit.
Summary
syscall.SIGHUPdoesn't exist on Windows, preventing compilationsignals_unix.go,signals_windows.go)Test plan
GOOS=windows go build ./...🤖 Generated with Claude Code
Summary by CodeRabbit