Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jul 2025 06:22:07 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c599948cca4b - main - devd: accept new clients before notifying them
Message-ID:  <202507230622.56N6M7lE020308@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0

commit c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0
Author:     Sludge <sludge.phd+git@gmail.com>
AuthorDate: 2025-07-17 05:36:20 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-07-23 05:57:31 +0000

    devd: accept new clients before notifying them
    
    Signed-off-by: Sludge! <sludge.phd+git@gmail.com>
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1771
---
 sbin/devd/devd.cc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 6705dcc0158e..1ff405244cde 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -1111,6 +1111,14 @@ event_loop(void)
 			err(1, "select");
 		} else if (rv == 0)
 			check_clients();
+		/*
+		 * Aside from the socket type, both sockets use the same
+		 * protocol, so we can process clients the same way.
+		 */
+		if (FD_ISSET(stream_fd, &fds))
+			new_client(stream_fd, SOCK_STREAM);
+		if (FD_ISSET(seqpacket_fd, &fds))
+			new_client(seqpacket_fd, SOCK_SEQPACKET);
 		if (FD_ISSET(fd, &fds)) {
 			rv = read(fd, buffer, sizeof(buffer) - 1);
 			if (rv > 0) {
@@ -1139,14 +1147,6 @@ event_loop(void)
 				break;
 			}
 		}
-		if (FD_ISSET(stream_fd, &fds))
-			new_client(stream_fd, SOCK_STREAM);
-		/*
-		 * Aside from the socket type, both sockets use the same
-		 * protocol, so we can process clients the same way.
-		 */
-		if (FD_ISSET(seqpacket_fd, &fds))
-			new_client(seqpacket_fd, SOCK_SEQPACKET);
 	}
 	cfg.remove_pidfile();
 	close(seqpacket_fd);



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