Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os,os/signal: documentation issue with Notify(), syscall.SIGTERM, and CTRL_CLOSE_EVENT/CTRL_LOGOFF_EVENT/CTRL_SHUTDOWN_EVENT #69847

Closed
ucirello opened this issue Oct 11, 2024 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation Issues describing a change to documentation.

Comments

@ucirello
Copy link
Contributor

Go version

go1.23

Output of go env in your module/workspace:

Not applicable

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.

@gopherbot gopherbot added compiler/runtime Issues related to the Go compiler and/or runtime. Documentation Issues describing a change to documentation. labels Oct 11, 2024
@seankhliao
Copy link
Member

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
@ucirello
Copy link
Contributor Author

You are right @seankhliao -- sorry for my lack of attention to what I thought I saw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation Issues describing a change to documentation.
Projects
None yet
Development

No branches or pull requests

4 participants