mirror of
https://github.com/golang/go
synced 2024-11-21 20:04:44 -07:00
syscall: on freebsd, darwin, give Kill same signature as on linux
R=r, cw CC=golang-dev https://golang.org/cl/201043
This commit is contained in:
parent
ea344e123a
commit
f2317d3ec1
@ -454,6 +454,10 @@ func SysctlUint32(name string) (value uint32, errno int) {
|
||||
return *(*uint32)(unsafe.Pointer(&buf[0])), 0
|
||||
}
|
||||
|
||||
//sys kill(pid int, signum int, posix int) (errno int)
|
||||
|
||||
func Kill(pid int, signum int) (errno int) { return kill(pid, signum, 1) }
|
||||
|
||||
// TODO: wrap
|
||||
// Acct(name nil-string) (errno int)
|
||||
// Futimes(fd int, timeval *Timeval) (errno int) // Pointer to 2 timevals!
|
||||
@ -511,7 +515,6 @@ func SysctlUint32(name string) (value uint32, errno int) {
|
||||
//sys Getsid(pid int) (sid int, errno int)
|
||||
//sys Getuid() (uid int)
|
||||
//sys Issetugid() (tainted bool)
|
||||
//sys Kill(pid int, signum int, posix int) (errno int)
|
||||
//sys Kqueue() (fd int, errno int)
|
||||
//sys Lchown(path string, uid int, gid int) (errno int)
|
||||
//sys Link(path string, link string) (errno int)
|
||||
|
@ -454,6 +454,10 @@ func SysctlUint32(name string) (value uint32, errno int) {
|
||||
return *(*uint32)(unsafe.Pointer(&buf[0])), 0
|
||||
}
|
||||
|
||||
//sys kill(pid int, signum int, posix int) (errno int)
|
||||
|
||||
func Kill(pid int, signum int) (errno int) { return kill(pid, signum, 1) }
|
||||
|
||||
// TODO: wrap
|
||||
// Acct(name nil-string) (errno int)
|
||||
// Futimes(fd int, timeval *Timeval) (errno int) // Pointer to 2 timevals!
|
||||
@ -511,7 +515,6 @@ func SysctlUint32(name string) (value uint32, errno int) {
|
||||
//sys Gettimeofday(tv *Timeval) (errno int)
|
||||
//sys Getuid() (uid int)
|
||||
//sys Issetugid() (tainted bool)
|
||||
//sys Kill(pid int, signum int, posix int) (errno int)
|
||||
//sys Kqueue() (fd int, errno int)
|
||||
//sys Lchown(path string, uid int, gid int) (errno int)
|
||||
//sys Link(path string, link string) (errno int)
|
||||
|
@ -370,7 +370,7 @@ func Issetugid() (tainted bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func Kill(pid int, signum int, posix int) (errno int) {
|
||||
func kill(pid int, signum int, posix int) (errno int) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
errno = int(e1)
|
||||
return
|
||||
|
@ -370,7 +370,7 @@ func Issetugid() (tainted bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func Kill(pid int, signum int, posix int) (errno int) {
|
||||
func kill(pid int, signum int, posix int) (errno int) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
errno = int(e1)
|
||||
return
|
||||
|
@ -370,7 +370,7 @@ func Issetugid() (tainted bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func Kill(pid int, signum int, posix int) (errno int) {
|
||||
func kill(pid int, signum int, posix int) (errno int) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
errno = int(e1)
|
||||
return
|
||||
|
@ -370,7 +370,7 @@ func Issetugid() (tainted bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func Kill(pid int, signum int, posix int) (errno int) {
|
||||
func kill(pid int, signum int, posix int) (errno int) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
errno = int(e1)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user