From 039b61c058ed96cb3a888f9dee21bca7997f0a39 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 11 Mar 2013 17:40:12 +0000 Subject: handle ECONNABORTED errors from accept(). In many code blocks they can be ignored silently and without aborting, much like EINTR and EWOULDBLOCK are. ok's from various maintainers of these directories... --- usr.sbin/inetd/inetd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr.sbin/inetd/inetd.c') diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 765709616b6..92639260eba 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inetd.c,v 1.133 2012/04/19 14:33:24 gsoares Exp $ */ +/* $OpenBSD: inetd.c,v 1.134 2013/03/11 17:40:11 deraadt Exp $ */ /* * Copyright (c) 1983,1991 The Regents of the University of California. @@ -496,9 +496,10 @@ gettcp(struct servtab *sep) if (debug) fprintf(stderr, "accept, ctrl %d\n", ctrl); if (ctrl < 0) { - if (errno == EINTR) - return -1; - syslog(LOG_WARNING, "accept (for %s): %m", sep->se_service); + if (errno != EWOULDBLOCK && errno != EINTR && + errno != ECONNABORTED) + syslog(LOG_WARNING, "accept (for %s): %m", + sep->se_service); return -1; } if ((sep->se_family == AF_INET || sep->se_family == AF_INET6) && -- cgit v1.2.3