Go version
go1.23
Output of go env in your module/workspace:
What did you do?
I am trying to understand how Go handles signals on Windows.
What did you see happen?
When I read https://pkg.go.dev/os/signal?GOOS=windows#hdr-Windows, I see:
Additionally, if Notify is called, and Windows sends CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT or CTRL_SHUTDOWN_EVENT to the process, Notify will return syscall.SIGTERM
However, in https://pkg.go.dev/syscall?GOOS=windows there is no syscall.SIGTERM.
What did you expect to see?
Probably, the documentation meant me to use https://pkg.go.dev/golang.org/x/sys/windows.
I would expect the os/signal to indicate that I should look for the package described above.
Go version
go1.23
Output of
go envin your module/workspace:What did you do?
I am trying to understand how Go handles signals on Windows.
What did you see happen?
When I read https://pkg.go.dev/os/signal?GOOS=windows#hdr-Windows, I see:
However, in
https://pkg.go.dev/syscall?GOOS=windowsthere is nosyscall.SIGTERM.What did you expect to see?
Probably, the documentation meant me to use
https://pkg.go.dev/golang.org/x/sys/windows.I would expect the
os/signalto indicate that I should look for the package described above.