diff options
author | ben <ben@pkgsrc.org> | 2006-01-01 19:40:43 +0000 |
---|---|---|
committer | ben <ben@pkgsrc.org> | 2006-01-01 19:40:43 +0000 |
commit | 804d5c64619e64ec9f49c7cbce9719656cb0d444 (patch) | |
tree | a150e2c2fe38ce177e66771c22ff0ed9c2c273a8 /mail | |
parent | e7a79ceb55fb440ecfaa7fb1250bca863c2c1641 (diff) | |
download | pkgsrc-804d5c64619e64ec9f49c7cbce9719656cb0d444.tar.gz |
Because of an Interix bug involving fork and stderr, mutt fails to exec
sendmail, which prevents mutt from sending messages. patch-am works
around this issue by postponing the closing of all file descriptors
until after the fork.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mutt/Makefile | 3 | ||||
-rw-r--r-- | mail/mutt/distinfo | 3 | ||||
-rw-r--r-- | mail/mutt/patches/patch-am | 41 |
3 files changed, 45 insertions, 2 deletions
diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile index e0d908a67af..c233bdac215 100644 --- a/mail/mutt/Makefile +++ b/mail/mutt/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.133 2006/01/01 13:28:02 ben Exp $ +# $NetBSD: Makefile,v 1.134 2006/01/01 19:40:43 ben Exp $ DISTNAME= mutt-1.4.2.1i PKGNAME= ${DISTNAME:C/i$//} @@ -43,6 +43,7 @@ SUBST_MESSAGE.mgroup= "Configuring mail group." SUBST_STAGE.mgroup= post-patch SUBST_FILES.mgroup= configure SUBST_SED.mgroup= -e "s,DOTLOCK_GROUP='mail',DOTLOCK_GROUP='+Administrators'," +CPPFLAGS+= -D__BROKEN_INTERIX_FORK .endif # There is a problem using /bin/sh on old NetBSD releases, so use /bin/ksh diff --git a/mail/mutt/distinfo b/mail/mutt/distinfo index 10072da87bb..cc214993c7e 100644 --- a/mail/mutt/distinfo +++ b/mail/mutt/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.26 2005/12/26 16:45:27 ben Exp $ +$NetBSD: distinfo,v 1.27 2006/01/01 19:40:43 ben Exp $ SHA1 (mutt-1.4.2.1i.tar.gz) = 10fae2eef5a671d1ea6e17acd6e64cd1f37c3961 RMD160 (mutt-1.4.2.1i.tar.gz) = 314536f77e0494dc6e4a5d57c681de791c8ce0fc @@ -12,3 +12,4 @@ SHA1 (patch-ai) = 317b736d6b9a896e1ee185cce37a1c2184c02cde SHA1 (patch-aj) = a0ee2bc9a7b9e743e313101899de3d991a9d2cad SHA1 (patch-ak) = 689305356812d04bd3b490c436ed898a4b308136 SHA1 (patch-al) = d05f5a1606bf8a7669db198a0f85f95eb17f74b4 +SHA1 (patch-am) = faa80ebf308eddfcbbe5aeab2f52d2d356d540cf diff --git a/mail/mutt/patches/patch-am b/mail/mutt/patches/patch-am new file mode 100644 index 00000000000..8e781fe6e07 --- /dev/null +++ b/mail/mutt/patches/patch-am @@ -0,0 +1,41 @@ +$NetBSD: patch-am,v 1.1 2006/01/01 19:40:43 ben Exp $ + +--- sendlib.c.orig Fri May 31 09:59:39 2002 ++++ sendlib.c +@@ -1803,6 +1803,7 @@ send_msg (const char *path, char **args, + */ + setsid (); + ++#if !defined(__BROKEN_INTERIX_FORK) + /* next we close all open files */ + #if defined(OPEN_MAX) + for (fd = 0; fd < OPEN_MAX; fd++) +@@ -1815,9 +1816,27 @@ send_msg (const char *path, char **args, + close (1); + close (2); + #endif ++#endif + + /* now the second fork() */ +- if ((pid = fork ()) == 0) ++ pid = fork (); ++ ++#if defined(__BROKEN_INTERIX_FORK) ++ /* next we close all open files */ ++#if defined(OPEN_MAX) ++ for (fd = 0; fd < OPEN_MAX; fd++) ++ close (fd); ++#elif defined(_POSIX_OPEN_MAX) ++ for (fd = 0; fd < _POSIX_OPEN_MAX; fd++) ++ close (fd); ++#else ++ close (0); ++ close (1); ++ close (2); ++#endif ++#endif ++ ++ if (pid == 0) + { + /* "msg" will be opened as stdin */ + if (open (msg, O_RDONLY, 0) < 0) |