summaryrefslogtreecommitdiffstats
path: root/qmail.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmail.c')
-rw-r--r--qmail.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/qmail.c b/qmail.c
index 0fe0dfa..186c092 100644
--- a/qmail.c
+++ b/qmail.c
@@ -6,8 +6,17 @@
6#include "fd.h" 6#include "fd.h"
7#include "qmail.h" 7#include "qmail.h"
8#include "auto_qmail.h" 8#include "auto_qmail.h"
9#include "env.h"
9 10
10static char *binqqargs[2] = { "bin/qmail-queue", 0 } ; 11static char *binqqargs[2] = { 0, 0 } ;
12
13static void setup_qqargs()
14{
15 if(!binqqargs[0])
16 binqqargs[0] = env_get("QMAILQUEUE");
17 if(!binqqargs[0])
18 binqqargs[0] = "bin/qmail-queue";
19}
11 20
12int qmail_open(qq) 21int qmail_open(qq)
13struct qmail *qq; 22struct qmail *qq;
@@ -15,6 +24,8 @@ struct qmail *qq;
15 int pim[2]; 24 int pim[2];
16 int pie[2]; 25 int pie[2];
17 26
27 setup_qqargs();
28
18 if (pipe(pim) == -1) return -1; 29 if (pipe(pim) == -1) return -1;
19 if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; } 30 if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }
20 31