1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -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:
Russ Cox 2010-02-04 02:06:08 -08:00
parent ea344e123a
commit f2317d3ec1
6 changed files with 12 additions and 6 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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