The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0
commit c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0 Author: Sludge <sludge.phd+...@gmail.com> AuthorDate: 2025-07-17 05:36:20 +0000 Commit: Warner Losh <i...@freebsd.org> CommitDate: 2025-07-23 05:57:31 +0000 devd: accept new clients before notifying them Signed-off-by: Sludge! <sludge.phd+...@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);