-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/unix: expose signal and errno names as strings #25134
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
Comments
Change https://golang.org/cl/110156 mentions this issue: |
Sounds fine to me. It would be nice if we had func (s Signal) Name() string { ... }
func (e Errno) Name() string {... } @ianlancetaylor @bradfitz what do you think? |
I think we would still want |
Change https://golang.org/cl/110875 mentions this issue: |
@tklauser it seems that |
Change https://golang.org/cl/139977 mentions this issue: |
@kolyshkin uh, I forgot to change it there because |
This wasn't converted during CL 110875 Updates golang/go#25134 Change-Id: Iaa579e0c173d3e27cf9f7e20072752277089beb1 Reviewed-on: https://go-review.googlesource.com/c/139977 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Currently, signal and errno names are represented by the following generated Go code (abbreviated):
There is no way to get back signal or errno name (
SIGINT
andEAGAIN
) from the number for, for example, nice logging messages.I propose to expose them via two functions:
That's something that annoyed me for years, but I finally decided to create an issue.
The text was updated successfully, but these errors were encountered: