Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2018 20:39:49 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Eitan Adler <eadler@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r329296 - head/sbin/devd
Message-ID:  <CANCZdfrEPUJoQKMYKHDZj8cW5Na_6ODZZVzL9nCO2A1p7nTSTg@mail.gmail.com>
In-Reply-To: <201802150322.w1F3Mrie018786@repo.freebsd.org>
References:  <201802150322.w1F3Mrie018786@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 14, 2018 8:23 PM, "Eitan Adler" <eadler@freebsd.org> wrote:

Author: eadler
Date: Thu Feb 15 03:22:53 2018
New Revision: 329296
URL: https://svnweb.freebsd.org/changeset/base/329296

Log:
  devd: don't pass &fds in useless parameters to select(2)

  select(2) should be declared as restrict. In addition the only fd in
  the fdset is open O_RDONLY, and it's not a socket that can provide OOB
  notifications,

  Reviewed by:  ian, imp, vangyzen


Don't put my name on this. I specifically and clearly objected to the
change anf tld yoy not to do it.

Warner


Modified:
  head/sbin/devd/devd.cc

Modified: head/sbin/devd/devd.cc
============================================================
==================
--- head/sbin/devd/devd.cc      Thu Feb 15 03:22:04 2018        (r329295)
+++ head/sbin/devd/devd.cc      Thu Feb 15 03:22:53 2018        (r329296)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrEPUJoQKMYKHDZj8cW5Na_6ODZZVzL9nCO2A1p7nTSTg>