select call in devd
Gleb Popov
6yearold at gmail.com
Wed Feb 14 07:56:41 UTC 2018
On Wed, Feb 14, 2018 at 10:13 AM, Eitan Adler <lists at eitanadler.com> wrote:
> Hi all,
>
> select(2) is declared with restrict for the pointers for fd. Can y'all
> confirm this is the correct fix?
>
> It is only lightly tested (it seems to do its job on my machine)
>
> Index: devd.cc
> ===================================================================
> --- devd.cc (revision 329192)
> +++ devd.cc (working copy)
> @@ -1021,7 +1021,7 @@ event_loop(void)
> tv.tv_usec = 0;
> FD_ZERO(&fds);
> FD_SET(fd, &fds);
> - rv = select(fd + 1, &fds, &fds, &fds, &tv);
> + rv = select(fd + 1, &fds, NULL, NULL, &tv);
> // No events -> we've processed all pending events
> if (rv == 0) {
> devdlog(LOG_DEBUG, "Calling daemon\n");
>
>
> --
> Eitan Adler
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
Haven't looked at code at all, but why is it using select and not
kqueue/kevent?
More information about the freebsd-hackers
mailing list