mirror of
https://github.com/rwinkhart/sys.git
synced 2026-10-28 12:19:57 -04:00
go.sys/unix: use syscall.Errno for errors
If we use a local type, it won't compare properly with errors from the rest of the standard library. Errors are the one type from syscall that propagates through the system, so it's important to have only one type for them. Ditto for syscall.Signal. LGTM=dave R=rsc, dave CC=golang-codereviews https://golang.org/cl/123490043
This commit is contained in:
1 parent
70c4b52aa0
commit
dc3c21c62b
58 files changed
+2546
-2491
No files matched your search
@@ -14,6 +14,7 @@ package unix
|
||||
|
||||
import (
|
||||
errorspkg "errors"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -208,7 +209,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
|
||||
//sys kill(pid int, signum int, posix int) (err error)
|
||||
|
||||
func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1) }
|
||||
func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
|
||||
Reference in new issue
Block a user