mirror of
https://github.com/golang/go
synced 2024-11-22 02:14:40 -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:
parent
dcabd19a37
commit
b655fa8d1d
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user