summaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-11 17:40:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-11 17:40:12 +0000
commit039b61c058ed96cb3a888f9dee21bca7997f0a39 (patch)
treee836c8501a7ce9ead08db116a7d3413b4c79e0ff /usr.sbin/inetd/inetd.c
parent11f71752a566cd212ee320890884ad5c2b6dcc64 (diff)
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...
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c9
1 files changed, 5 insertions, 4 deletions
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) &&