pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/mutt Because of an Interix bug involving fork and...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a0f9f048ec38
branches: trunk
changeset: 505258:a0f9f048ec38
user: ben <ben%pkgsrc.org@localhost>
date: Sun Jan 01 19:40:43 2006 +0000
description:
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:
mail/mutt/Makefile | 3 ++-
mail/mutt/distinfo | 3 ++-
mail/mutt/patches/patch-am | 41 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 2 deletions(-)
diffs (76 lines):
diff -r 575a2aa9e486 -r a0f9f048ec38 mail/mutt/Makefile
--- a/mail/mutt/Makefile Sun Jan 01 19:38:27 2006 +0000
+++ b/mail/mutt/Makefile Sun Jan 01 19:40:43 2006 +0000
@@ -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_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 -r 575a2aa9e486 -r a0f9f048ec38 mail/mutt/distinfo
--- a/mail/mutt/distinfo Sun Jan 01 19:38:27 2006 +0000
+++ b/mail/mutt/distinfo Sun Jan 01 19:40:43 2006 +0000
@@ -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-aj) = a0ee2bc9a7b9e743e313101899de3d991a9d2cad
SHA1 (patch-ak) = 689305356812d04bd3b490c436ed898a4b308136
SHA1 (patch-al) = d05f5a1606bf8a7669db198a0f85f95eb17f74b4
+SHA1 (patch-am) = faa80ebf308eddfcbbe5aeab2f52d2d356d540cf
diff -r 575a2aa9e486 -r a0f9f048ec38 mail/mutt/patches/patch-am
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/mutt/patches/patch-am Sun Jan 01 19:40:43 2006 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index