aboutsummaryrefslogtreecommitdiffstats
path: root/smtpd/lka.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2019-07-04 20:08:09 +0200
committerGilles Chehade <gilles@poolp.org>2019-07-04 20:08:09 +0200
commitae722b653066574182c25f0edc7949be437af0f4 (patch)
treefc5050ea25c9745fcf71c3a97c6bcff636083713 /smtpd/lka.c
parentsync (diff)
downloadOpenSMTPD-ae722b653066574182c25f0edc7949be437af0f4.tar.xz
OpenSMTPD-ae722b653066574182c25f0edc7949be437af0f4.zip
sync
Diffstat (limited to 'smtpd/lka.c')
-rw-r--r--smtpd/lka.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/smtpd/lka.c b/smtpd/lka.c
index d5d55410..6548700e 100644
--- a/smtpd/lka.c
+++ b/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.234 2019/06/13 11:45:34 eric Exp $ */
+/* $OpenBSD: lka.c,v 1.235 2019/06/27 05:14:49 martijn Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -360,9 +360,21 @@ lka_imsg(struct mproc *p, struct imsg *imsg)
m_get_string(&m, &procname);
m_end(&m);
+ m_create(p, IMSG_LKA_PROCESSOR_ERRFD, 0, 0, -1);
+ m_add_string(p, procname);
+ m_close(p);
+
lka_proc_forked(procname, imsg->fd);
return;
+ case IMSG_LKA_PROCESSOR_ERRFD:
+ m_msg(&m, imsg);
+ m_get_string(&m, &procname);
+ m_end(&m);
+
+ lka_proc_errfd(procname, imsg->fd);
+ shutdown(imsg->fd, SHUT_WR);
+ return;
case IMSG_REPORT_SMTP_LINK_CONNECT:
m_msg(&m, imsg);