diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-14 16:44:15 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-14 16:44:15 +0000 |
commit | 034a0252a19eeacb9c170b4e9e717523762a88ed (patch) | |
tree | 6946497f3035e5820fcaf2bcf9d23cc4b63b108d /usr.sbin/smtpd/queue.c | |
parent | 08715c4cca55339b6172439518c6befab992639b (diff) |
Impose sessions limit on the delivery sessions (mta and mda).
Diffstat (limited to 'usr.sbin/smtpd/queue.c')
-rw-r--r-- | usr.sbin/smtpd/queue.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index d43164ac4c4..8d6a505efdf 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.74 2009/12/13 22:02:55 jacekm Exp $ */ +/* $OpenBSD: queue.c,v 1.75 2009/12/14 16:44:14 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -585,6 +585,8 @@ queue(struct smtpd *env) * increase relative to default. */ fdlimit(getdtablesize() * 2); + if ((env->sc_maxconn = availdesc() / 4) < 1) + fatalx("runner: fd starvation"); config_pipes(env, peers, nitems(peers)); config_peers(env, peers, nitems(peers)); |