blob: 6a46485025ef6f8a6b9f1f9611740de6bf73de2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-ab,v 1.2 2004/04/10 05:30:06 schmonz Exp $
--- qmail.c.orig 1998-06-15 06:53:16.000000000 -0400
+++ qmail.c
@@ -6,8 +6,17 @@
#include "fd.h"
#include "qmail.h"
#include "auto_qmail.h"
+#include "env.h"
-static char *binqqargs[2] = { "bin/qmail-queue", 0 } ;
+static char *binqqargs[2] = { 0, 0 } ;
+
+static void setup_qqargs()
+{
+ if(!binqqargs[0])
+ binqqargs[0] = env_get("QMAILQUEUE");
+ if(!binqqargs[0])
+ binqqargs[0] = "bin/qmail-queue";
+}
int qmail_open(qq)
struct qmail *qq;
@@ -15,6 +24,8 @@ struct qmail *qq;
int pim[2];
int pie[2];
+ setup_qqargs();
+
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }
|