fix(cmd/gf): run AddSigHandlerShutdown cannot work well)#4441
fix(cmd/gf): run AddSigHandlerShutdown cannot work well)#4441hailaz merged 4 commits intogogf:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes signal handling for process termination in the gf command tool to address platform-specific differences between Windows and Unix-like systems. The fix addresses the issue where AddSigHandlerShutdown cannot work properly on Windows due to signal handling limitations.
- Adds platform-specific signal handling logic that gracefully terminates processes on Unix-like systems while falling back to force kill on Windows
- Implements a timeout mechanism for graceful shutdown attempts to prevent hanging processes
- Separates signal-based termination from direct kill operations based on the operating system
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
waitCtx, cancel := context.WithTimeout(ctx, 30*time.Second) 我加了ctx控制协程退出 |
#3752
Sending [Interrupt] on Windows is not implemented.