mirror of
https://github.com/golang/go
synced 2024-11-22 02:24:41 -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
|
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
|
// TODO: wrap
|
||||||
// Acct(name nil-string) (errno int)
|
// Acct(name nil-string) (errno int)
|
||||||
// Futimes(fd int, timeval *Timeval) (errno int) // Pointer to 2 timevals!
|
// 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 Gettimeofday(tv *Timeval) (errno int)
|
||||||
//sys Getuid() (uid int)
|
//sys Getuid() (uid int)
|
||||||
//sys Issetugid() (tainted bool)
|
//sys Issetugid() (tainted bool)
|
||||||
|
//sys Kill(pid int, signum int) (errno int)
|
||||||
//sys Kqueue() (fd int, errno int)
|
//sys Kqueue() (fd int, errno int)
|
||||||
//sys Lchown(path string, uid int, gid int) (errno int)
|
//sys Lchown(path string, uid int, gid int) (errno int)
|
||||||
//sys Link(path string, link string) (errno int)
|
//sys Link(path string, link string) (errno int)
|
||||||
|
@ -370,8 +370,8 @@ func Issetugid() (tainted bool) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func kill(pid int, signum int, posix int) (errno int) {
|
func Kill(pid int, signum int) (errno int) {
|
||||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
|
||||||
errno = int(e1)
|
errno = int(e1)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -370,8 +370,8 @@ func Issetugid() (tainted bool) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func kill(pid int, signum int, posix int) (errno int) {
|
func Kill(pid int, signum int) (errno int) {
|
||||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
|
||||||
errno = int(e1)
|
errno = int(e1)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user