summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-07-31 13:10:52 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-07-31 13:10:52 +0000
commitcc221d575afd5334c5ac8e02eeaaa48fec13df38 (patch)
tree0f2d0cfdd51abae01a65ce924db7a65512662c8c /usr.sbin/inetd/inetd.c
parentcf7c041ce22ea0f14873fda1e43dac8455c80ef4 (diff)
downloadFreeBSD-src-cc221d575afd5334c5ac8e02eeaaa48fec13df38.zip
FreeBSD-src-cc221d575afd5334c5ac8e02eeaaa48fec13df38.tar.gz
Sleep for a second after tcp wrappers rejects a connection, so we
don't traumatise the parent inetd. Requested by: wietse@porcupine.org Approved by: markm
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 7669d5f..8b7d05a 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -663,8 +663,10 @@ main(argc, argv, envp)
eval_client(&req), service, sep->se_proto);
if (sep->se_socktype != SOCK_STREAM)
recv(ctrl, buf, sizeof (buf), 0);
- if (dofork)
+ if (dofork) {
+ sleep(1);
_exit(0);
+ }
}
if (log) {
syslog(allow_severity,
OpenPOWER on IntegriCloud