[Bug 240015] kqueue(2) manual example code is a bit wrong.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 23 Feb 2024 13:00:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240015
--- Comment #1 from unitrunker <unitrunker@gmail.com> ---
It looks to me as though the sample code was fixed.
/* Initialize kevent structure. */
EV_SET(&event, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_WRITE,
0, NULL);
/* Attach event to the kqueue. */
ret = kevent(kq, &event, 1, NULL, 0, NULL);
if (ret == -1)
err(EXIT_FAILURE, "kevent register");
for (;;) {
/* Sleep until something happens. */
Those two lines are now gone. @linimon I think this can be closed.
--
You are receiving this mail because:
You are on the CC list for the bug.