Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(cmd/gf): run AddSigHandlerShutdown cannot work well)#4441

Merged
hailaz merged 4 commits intogogf:masterfrom
wanghaolong613:fix/3752
Sep 23, 2025
Merged

fix(cmd/gf): run AddSigHandlerShutdown cannot work well)#4441
hailaz merged 4 commits intogogf:masterfrom
wanghaolong613:fix/3752

Conversation

@wanghaolong613
Copy link
Contributor

@wanghaolong613 wanghaolong613 commented Sep 22, 2025

#3752

Sending [Interrupt] on Windows is not implemented.

@hailaz hailaz requested a review from Copilot September 22, 2025 09:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hailaz hailaz requested a review from Copilot September 22, 2025 10:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@wanghaolong613
Copy link
Contributor Author

waitCtx, cancel := context.WithTimeout(ctx, 30*time.Second) 我加了ctx控制协程退出

@hailaz hailaz merged commit d2bc5d8 into gogf:master Sep 23, 2025
18 checks passed
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