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

Documentation: no mention that certain syscall signals are not available on all Unix/Linux platforms #71468

Closed
BatmanAoD opened this issue Jan 28, 2025 · 2 comments
Labels
Documentation Issues describing a change to documentation.

Comments

@BatmanAoD
Copy link

BatmanAoD commented Jan 28, 2025

The SIGSTKFLT signal is documented in https://pkg.go.dev/syscall and https://pkg.go.dev/os/signal#hdr-Default_behavior_of_signals_in_Go_programs. But it is not present on certain platforms, including Darwin arm64. This is correct, but as far as I can tell isn't mentioned in the documentation. It would be helpful if the documentation specified which signals are expected to be available on all (Unix-like) platforms, and which may not exist on all platforms.

@gopherbot gopherbot added the Documentation Issues describing a change to documentation. label Jan 28, 2025
@BatmanAoD BatmanAoD changed the title Documentation: no mention that certain syscall signals are not available on all Unix platforms Documentation: no mention that certain syscall signals are not available on all Unix/Linux platforms Jan 28, 2025
@seankhliao
Copy link
Member

Package syscall contains an interface to the low-level operating system primitives. The details vary depending on the underlying system, and by default, godoc will display the syscall documentation for the current system.

pkg.go.dev has a OS switcher, it defaults to linux/amd64.

note that syscall is marked frozen, prefer golang.org/x/sys/unix instead.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
@BatmanAoD
Copy link
Author

Thank you; I hadn't noticed the OS-switcher and thought that because Windows and Plan 9 are documented regardless of the selected OS, that the remaining documentation was intended to apply to all OSes.

The signal package documentation lists SIGSTKFLT and SIGEMT regardless of which OS is selected, but I suppose that may not be worth fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues describing a change to documentation.
Projects
None yet
Development

No branches or pull requests

3 participants