git: 0efab2ba4c00 - stable/15 - ctld: Return from the inner "main" loop on EINTR

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 23 Jun 2026 16:28:09 UTC
The branch stable/15 has been updated by jhb:

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

commit 0efab2ba4c0017c28d21efca76a7947eb7a2f087
Author:     Nikolay Denev <ndenev@gmail.com>
AuthorDate: 2026-04-20 17:18:50 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-06-23 16:05:31 +0000

    ctld: Return from the inner "main" loop on EINTR
    
    This ensures that child processes are reaped in the outer loop in
    main().
    
    PR:             294035
    Reviewed by:    asomers
    Fixes:          66b107e82b2f ("ctld: Use kevent(2) for socket events rather than select(2)")
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D56525
    (cherry picked from commit e56687bb2d32ee4b1774300f3960427ca56b34bb)
---
 usr.sbin/ctld/ctld.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc
index 6ec64cc253d6..336aedd68aab 100644
--- a/usr.sbin/ctld/ctld.cc
+++ b/usr.sbin/ctld/ctld.cc
@@ -2433,7 +2433,7 @@ main_loop(bool dont_fork)
 			error = kevent(kqfd, NULL, 0, &kev, 1, NULL);
 			if (error == -1) {
 				if (errno == EINTR)
-					continue;
+					return;
 				log_err(1, "kevent");
 			}