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:
Ian Lance Taylor 2011-12-19 12:57:49 -08:00
parent 1d0f93b4be
commit 384329592a
10 changed files with 49 additions and 11 deletions

View file

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