1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:24:50 -07:00

FreeBSD: Kill only takes pid & signal

Cosmetic fix.  The FreeBSD system call only takes two
arguments.

http://fxr.watson.org/fxr/source/kern/kern_sig.c?im=bigexcerpts#L1678

R=dho, rsc
CC=golang-dev
https://golang.org/cl/202051
This commit is contained in:
Christopher Wedgwood 2010-02-04 13:08:54 -08:00 committed by Russ Cox
parent dcabd19a37
commit b655fa8d1d
3 changed files with 5 additions and 8 deletions

View File

@ -454,10 +454,6 @@ 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!
@ -515,6 +511,7 @@ func Kill(pid int, signum int) (errno int) { return kill(pid, signum, 1) }
//sys Gettimeofday(tv *Timeval) (errno int)
//sys Getuid() (uid int)
//sys Issetugid() (tainted bool)
//sys Kill(pid int, signum 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,8 +370,8 @@ func Issetugid() (tainted bool) {
return
}
func kill(pid int, signum int, posix int) (errno int) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
func Kill(pid int, signum int) (errno int) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
errno = int(e1)
return
}

View File

@ -370,8 +370,8 @@ func Issetugid() (tainted bool) {
return
}
func kill(pid int, signum int, posix int) (errno int) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
func Kill(pid int, signum int) (errno int) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
errno = int(e1)
return
}