mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 16:47:27 -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:
@@ -3,7 +3,10 @@
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
@@ -652,7 +655,7 @@ func Issetugid() (tainted bool) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Kill(pid int, signum Signal) (err error) {
|
||||
func Kill(pid int, signum syscall.Signal) (err error) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
|
||||
Reference in New Issue
Block a user