summaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-16 23:57:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-16 23:57:38 +0000
commit5dd57eb77ffad3d14f39e68650530219f302f918 (patch)
treea42e5adfd5553efa9a9cdcd9e39b985c8f5b4bc1 /usr.sbin/inetd/inetd.c
parent4f541b0b9847f6c58b1b311c4527cefb021ba597 (diff)
check flags every loop, not just on EINTR
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index a3f2b68799c..5d04bb41199 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.72 2001/01/12 16:34:03 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.73 2001/01/16 23:57:37 deraadt Exp $ */
/* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.72 2001/01/12 16:34:03 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.73 2001/01/16 23:57:37 deraadt Exp $";
#endif /* not lint */
/*
@@ -463,23 +463,27 @@ main(argc, argv, envp)
}
bcopy(allsockp, readablep, allsockn);
+ if (wantretry) {
+ doretry();
+ wantretry = 0;
+ continue;
+ }
+ if (wantconfig) {
+ doconfig();
+ wantconfig = 0;
+ continue;
+ }
+ if (wantreap) {
+ doreap();
+ wantreap = 0;
+ continue;
+ }
+
if ((n = select(maxsock + 1, readablep, NULL, NULL, NULL)) <= 0) {
if (n < 0 && errno != EINTR) {
syslog(LOG_WARNING, "select: %m");
sleep(1);
}
- if (wantretry) {
- doretry();
- wantretry = 0;
- }
- if (wantconfig) {
- doconfig();
- wantconfig = 0;
- }
- if (wantreap) {
- doreap();
- wantreap = 0;
- }
continue;
}
for (sep = servtab; n && sep; sep = sep->se_next)