summaryrefslogtreecommitdiffstats
path: root/qmail.c
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-04 02:34:11 +0100
committermanuel <manuel@mausz.at>2013-02-04 02:34:11 +0100
commitc8255e888cc262f39744cd452a69f9807ecc1cbf (patch)
tree8e952a41a9fca9d97a3c43c347463b34ec5025a9 /qmail.c
parent8514473287c9594137c6fbc39f5619672ebc2430 (diff)
downloadqmail-c8255e888cc262f39744cd452a69f9807ecc1cbf.tar.gz
qmail-c8255e888cc262f39744cd452a69f9807ecc1cbf.tar.bz2
qmail-c8255e888cc262f39744cd452a69f9807ecc1cbf.zip
[PATCH] qmailqueue
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