-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAge
Milestone
Description
Currently, signal and errno names are represented by the following generated Go code (abbreviated):
const (
SIGINT = syscall.Signal(0x2)
)
const (
EAGAIN = syscall.Errno(0xb)
)
var signals = [...]string{
2: "interrupt",
}
var errors = [...]string{
11: "resource temporarily unavailable",
}There is no way to get back signal or errno name (SIGINT and EAGAIN) from the number for, for example, nice logging messages.
I propose to expose them via two functions:
func SignalName(s syscall.Signal) string { }
func ErrnoName(e syscall.Errno) string { }That's something that annoyed me for years, but I finally decided to create an issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAge