x/sys/windows: signal.Notify doesn't handle windows.Signal well #70369
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Thinking
Milestone
Go version
go version go1.22.3 windows/amd64
Output of
go env
in your module/workspace:What did you do?
When developing a server on Windows, we want to capture the SIGINT signal for extension purposes.
https://go.dev/play/p/wiNlThXDUPT
What did you see happen?
signal.Notify(c chan<- os.Signal, sig ...os.Signal) cannot correctly capture windows.Signal.
What did you expect to see?
signal.Notify can correctly handle windows.Signal.
This means that when pressing Ctrl+C, the logic can be correctly triggered.
The text was updated successfully, but these errors were encountered: