mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net, syscall, os: set CLOEXEC flag on epoll/kqueue descriptor
Enable new test in os. R=dave, iant, rsc CC=golang-dev https://golang.org/cl/5494061
This commit is contained in:
parent
1d0f93b4be
commit
384329592a
10 changed files with 49 additions and 11 deletions
|
|
@ -232,6 +232,17 @@ func EpollCreate(size int) (fd int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollCreate1(flag int) (fd int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue