svn commit: r281163 - head/usr.sbin/ctld

Alexander Motin mav at FreeBSD.org
Mon Apr 6 18:56:03 UTC 2015


Author: mav
Date: Mon Apr  6 18:56:02 2015
New Revision: 281163
URL: https://svnweb.freebsd.org/changeset/base/281163

Log:
  Make ctld to not exit on ECONNABORTED on accept().
  
  That is not really an error for the main process.
  
  MFC after:	1 week
  Sponsored by:	iXsystems, Inc.

Modified:
  head/usr.sbin/ctld/ctld.c

Modified: head/usr.sbin/ctld/ctld.c
==============================================================================
--- head/usr.sbin/ctld/ctld.c	Mon Apr  6 18:45:41 2015	(r281162)
+++ head/usr.sbin/ctld/ctld.c	Mon Apr  6 18:56:02 2015	(r281163)
@@ -2399,8 +2399,11 @@ found:
 					client_fd = accept(portal->p_socket,
 					    (struct sockaddr *)&client_sa,
 					    &client_salen);
-					if (client_fd < 0)
+					if (client_fd < 0) {
+						if (errno == ECONNABORTED)
+							continue;
 						log_err(1, "accept");
+					}
 					assert(client_salen >= client_sa.ss_len);
 
 					handle_connection(portal, client_fd,


More information about the svn-src-head mailing list