diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2014-04-04 13:13:59 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2014-04-04 13:13:59 +0000 |
commit | 7cf0aa4b5e47a8ad16bb6fa7a1f19d67771caeb2 (patch) | |
tree | 4eb7131ec06a3f8ce3bd3a05b3fc3cb59ba0d789 | |
parent | 7266ffd29f0cdd8aaf8d5497fe19a430c31db801 (diff) |
start the purge task after events are set, or we can miss SIGCHLD
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 0eec8b54a91..4399e308e91 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.216 2014/04/01 09:00:46 gilles Exp $ */ +/* $OpenBSD: smtpd.c,v 1.217 2014/04/04 13:13:58 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -616,7 +616,6 @@ main(int argc, char *argv[]) if (!queue_init(backend_queue, 1)) errx(1, "could not initialize queue backend"); - purge_task(); env->sc_stat = stat_backend_lookup(backend_stat); if (env->sc_stat == NULL) @@ -691,6 +690,8 @@ main(int argc, char *argv[]) if (pidfile(NULL) < 0) err(1, "pidfile"); + purge_task(); + if (event_dispatch() < 0) fatal("smtpd: event_dispatch"); |