chiark
/
gitweb
/
~mdw
/
dot-forward
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debianization.
[dot-forward]
/
qmail.c
diff --git
a/qmail.c
b/qmail.c
index 0fe0dfaf70f4ef62670ebddb80ea661eebe7d3a1..4de4a2cbcca3e54c94d770ab2df04436cf8a8a81 100644
(file)
--- a/
qmail.c
+++ b/
qmail.c
@@
-1,3
+1,4
@@
+#include <stdlib.h>
#include "substdio.h"
#include "readwrite.h"
#include "wait.h"
#include "substdio.h"
#include "readwrite.h"
#include "wait.h"
@@
-7,7
+8,15
@@
#include "qmail.h"
#include "auto_qmail.h"
#include "qmail.h"
#include "auto_qmail.h"
-static char *binqqargs[2] = { "bin/qmail-queue", 0 } ;
+static char *binqqargs[2] = { 0, 0 } ;
+
+static void setup_qqargs()
+{
+ if(!binqqargs[0])
+ binqqargs[0] = getenv("QMAILQUEUE");
+ if(!binqqargs[0])
+ binqqargs[0] = "/usr/sbin/qmail-queue";
+}
int qmail_open(qq)
struct qmail *qq;
int qmail_open(qq)
struct qmail *qq;
@@
-15,6
+24,7
@@
struct qmail *qq;
int pim[2];
int pie[2];
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; }
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }