From 6990bd384a5a11f1dfa75bc32d094dd02d1851a2 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 28 Aug 2018 16:14:58 +0000 Subject: user/netqmail: new package. First of *many* iterations. --- user/netqmail/0004-notifyfd.patch | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 user/netqmail/0004-notifyfd.patch (limited to 'user/netqmail/0004-notifyfd.patch') diff --git a/user/netqmail/0004-notifyfd.patch b/user/netqmail/0004-notifyfd.patch new file mode 100644 index 000000000..d734b1417 --- /dev/null +++ b/user/netqmail/0004-notifyfd.patch @@ -0,0 +1,41 @@ +--- netqmail-1.06.old/qmail-send.c ++++ netqmail-1.06/qmail-send.c +@@ -1,5 +1,7 @@ + #include + #include ++#include ++#include + #include "readwrite.h" + #include "sig.h" + #include "direntry.h" +@@ -1521,7 +1523,17 @@ + int nfds; + struct timeval tv; + int c; ++ int notifyfd = -1; + ++ { ++ char *x = getenv("QMAIL_NOTIFY_FD") ; ++ if (x) ++ { ++ unsigned long u; ++ if (scan_ulong(x, &u) && fcntl(u, F_GETFD) >= 0) notifyfd = (int)u; ++ } ++ } ++ + if (chdir(auto_qmail) == -1) + { log1("alert: cannot start: unable to switch to home directory\n"); _exit(111); } + if (!getcontrols()) +@@ -1567,6 +1579,12 @@ + pass_init(); + todo_init(); + cleanup_init(); ++ ++ if (notifyfd >=0) ++ { ++ write(notifyfd, "\n", 1); ++ close(notifyfd); ++ } + + while (!flagexitasap || !del_canexit()) + { -- cgit v1.2.3-60-g2f50