diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2019-10-23 08:58:49 +0200 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2019-10-23 08:08:58 +0000 |
commit | 9fc41cd697634c1a292750a66208ebba626efd5e (patch) | |
tree | 8dc21b1d904a4bc3538daf87d9500afc0435ee02 /src/runtime/netpoll_kqueue.go | |
parent | ab3f1a23b6c29a110423d6fd6bf2b01fa62a6fb2 (diff) | |
download | go-9fc41cd697634c1a292750a66208ebba626efd5e.tar.gz go-9fc41cd697634c1a292750a66208ebba626efd5e.zip |
runtime: report correct error if kevent failed in netpollinit
Report the value returned by kevent, not the previously set errno which
is 0.
Found while debugging CL 198544
Change-Id: I854f5418f8ed8e083d909d328501355496c67a53
Reviewed-on: https://go-review.googlesource.com/c/go/+/202777
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/netpoll_kqueue.go')
-rw-r--r-- | src/runtime/netpoll_kqueue.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/netpoll_kqueue.go b/src/runtime/netpoll_kqueue.go index 54586a393d..22902aa786 100644 --- a/src/runtime/netpoll_kqueue.go +++ b/src/runtime/netpoll_kqueue.go @@ -35,7 +35,7 @@ func netpollinit() { *(*uintptr)(unsafe.Pointer(&ev.ident)) = uintptr(r) n := kevent(kq, &ev, 1, nil, 0, nil) if n < 0 { - println("runtime: kevent failed with", -errno) + println("runtime: kevent failed with", -n) throw("runtime: kevent failed") } netpollBreakRd = uintptr(r) |