summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/queue.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2012-07-09 09:57:54 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2012-07-09 09:57:54 +0000
commit8376ba1aa378f25b77149196ef2518e8c1a8620c (patch)
treedb875efbc41a3f1d307047c5921897b4d8173e66 /usr.sbin/smtpd/queue.c
parent921a10fc6d6b3c123ef9f147c5e3ecc14b82cfdd (diff)
- runner is the terminology we used back when we had runqueues, we no
longer have them and runner is actually a scheduler so rename. - introduce scheduler_backend which does the same to scheduler than queue_backend does to queue and map_backend does to maps - remove all occurences of RUNNER and runner, replace them with SCHEDULER and scheduler ok eric@, ok chl@
Diffstat (limited to 'usr.sbin/smtpd/queue.c')
-rw-r--r--usr.sbin/smtpd/queue.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index 6fb660bfb71..d0e9549607b 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.120 2012/07/08 18:13:08 chl Exp $ */
+/* $OpenBSD: queue.c,v 1.121 2012/07/09 09:57:53 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -39,7 +39,7 @@
#include "log.h"
static void queue_imsg(struct imsgev *, struct imsg *);
-static void queue_pass_to_runner(struct imsgev *, struct imsg *);
+static void queue_pass_to_scheduler(struct imsgev *, struct imsg *);
static void queue_shutdown(void);
static void queue_sig_handler(int, short, void *);
@@ -85,7 +85,7 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
&ss, sizeof ss);
if (ss.code != 421)
- queue_pass_to_runner(iev, imsg);
+ queue_pass_to_scheduler(iev, imsg);
return;
@@ -99,7 +99,7 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
return;
case IMSG_SMTP_ENQUEUE:
- queue_pass_to_runner(iev, imsg);
+ queue_pass_to_scheduler(iev, imsg);
return;
}
}
@@ -129,8 +129,8 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
}
}
- if (iev->proc == PROC_RUNNER) {
- /* forward imsgs from runner on its behalf */
+ if (iev->proc == PROC_SCHEDULER) {
+ /* forward imsgs from scheduler on its behalf */
imsg_compose_event(env->sc_ievs[imsg->hdr.peerid], imsg->hdr.type,
0, imsg->hdr.pid, imsg->fd, (char *)imsg->data,
imsg->hdr.len - sizeof imsg->hdr);
@@ -150,7 +150,7 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
case IMSG_QUEUE_DELIVERY_TEMPFAIL:
case IMSG_QUEUE_DELIVERY_PERMFAIL:
case IMSG_BATCH_DONE:
- queue_pass_to_runner(iev, imsg);
+ queue_pass_to_scheduler(iev, imsg);
return;
}
}
@@ -161,7 +161,7 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
case IMSG_QUEUE_DELIVERY_TEMPFAIL:
case IMSG_QUEUE_DELIVERY_PERMFAIL:
case IMSG_MDA_SESS_NEW:
- queue_pass_to_runner(iev, imsg);
+ queue_pass_to_scheduler(iev, imsg);
return;
}
}
@@ -174,7 +174,7 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
case IMSG_QUEUE_RESUME_MTA:
case IMSG_QUEUE_SCHEDULE:
case IMSG_QUEUE_REMOVE:
- queue_pass_to_runner(iev, imsg);
+ queue_pass_to_scheduler(iev, imsg);
return;
}
}
@@ -183,7 +183,7 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
switch (imsg->hdr.type) {
case IMSG_CTL_VERBOSE:
log_verbose(*(int *)imsg->data);
- queue_pass_to_runner(iev, imsg);
+ queue_pass_to_scheduler(iev, imsg);
return;
}
}
@@ -192,9 +192,9 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg)
}
static void
-queue_pass_to_runner(struct imsgev *iev, struct imsg *imsg)
+queue_pass_to_scheduler(struct imsgev *iev, struct imsg *imsg)
{
- imsg_compose_event(env->sc_ievs[PROC_RUNNER], imsg->hdr.type,
+ imsg_compose_event(env->sc_ievs[PROC_SCHEDULER], imsg->hdr.type,
iev->proc, imsg->hdr.pid, imsg->fd, imsg->data,
imsg->hdr.len - sizeof imsg->hdr);
}
@@ -229,13 +229,13 @@ queue(void)
struct event ev_sigterm;
struct peer peers[] = {
- { PROC_PARENT, imsg_dispatch },
- { PROC_CONTROL, imsg_dispatch },
- { PROC_SMTP, imsg_dispatch },
- { PROC_MDA, imsg_dispatch },
- { PROC_MTA, imsg_dispatch },
- { PROC_LKA, imsg_dispatch },
- { PROC_RUNNER, imsg_dispatch }
+ { PROC_PARENT, imsg_dispatch },
+ { PROC_CONTROL, imsg_dispatch },
+ { PROC_SMTP, imsg_dispatch },
+ { PROC_MDA, imsg_dispatch },
+ { PROC_MTA, imsg_dispatch },
+ { PROC_LKA, imsg_dispatch },
+ { PROC_SCHEDULER, imsg_dispatch }
};
switch (pid = fork()) {
@@ -281,7 +281,7 @@ queue(void)
*/
fdlimit(1.0);
if ((env->sc_maxconn = availdesc() / 4) < 1)
- fatalx("runner: fd starvation");
+ fatalx("queue: fd starvation");
config_pipes(peers, nitems(peers));
config_peers(peers, nitems(peers));