diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2013-10-27 07:56:26 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2013-10-27 07:56:26 +0000 |
commit | 615c989e409f084e205249da90531e8a9a2de063 (patch) | |
tree | 75aba4167a61590ce3bb9f807c303850aa1fc846 /usr.sbin/smtpd/mta.c | |
parent | edccaa63dd7427ac9f020ce0551de05ed2969110 (diff) |
Create the control socket in the parent process to abort early if
another smtpd instance is running. Close the inherited socket in
every forked process but control.
Diffstat (limited to 'usr.sbin/smtpd/mta.c')
-rw-r--r-- | usr.sbin/smtpd/mta.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index 1566d91872f..2eeb23e6a08 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.164 2013/10/26 12:27:59 eric Exp $ */ +/* $OpenBSD: mta.c,v 1.165 2013/10/27 07:56:25 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -443,6 +443,7 @@ mta(void) case -1: fatal("mta: cannot fork"); case 0: + post_fork(PROC_MTA); break; default: return (pid); |