diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-14 00:37:22 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-14 00:48:59 +0200 |
commit | 29b0453cf15913b321ea423b7f81fdee55eb4409 (patch) | |
tree | 6fde0b109b8c1b88cc99fe51c4a574325b0fbf0d /uapi_darwin.go | |
parent | 7e10ebe1010898c48e3f1cfc12ad42d0bb5c0fa1 (diff) |
Send event on erroring kqueue
Diffstat (limited to 'uapi_darwin.go')
-rw-r--r-- | uapi_darwin.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/uapi_darwin.go b/uapi_darwin.go index 449fb98..0f6d904 100644 --- a/uapi_darwin.go +++ b/uapi_darwin.go @@ -109,6 +109,11 @@ func UAPIListen(name string, file *os.File) (net.Listener, error) { return } if kerr != nil || n != 1 { + if kerr != nil { + l.connErr <- kerr + } else { + l.connErr <- errors.New("kqueue returned empty") + } return } n, kerr = unix.Kevent(uapi.kqueueFd, []unix.Kevent_t{event}, events, nil) |