"Jeffrey C Honig" wrote:
>When running under mh-e, I set the MHCONTEXT environment variable to
>/dev/null.  This prevents my mh-e context from confusing my command line
>context.
>
>With 1.1 this breaks things.

We could allow MHCONTEXT=/dev/null with the following trivial patch.
Google reveals a script or two that uses this trick. I'm inclined to
apply it (although it seems a bit ugly) -- objections?

Index: sbr/context_read.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/context_read.c,v
retrieving revision 1.7
diff -u -r1.7 context_read.c
--- sbr/context_read.c  13 Nov 2005 23:51:18 -0000      1.7
+++ sbr/context_read.c  14 Nov 2005 22:19:28 -0000
@@ -120,8 +120,11 @@
     if ((cp = getenv ("MHCONTEXT")) == (char *)0 || *cp == '\0')
        cp = context;
 
-    /* context is NULL if context_foil() was called to disable use of context 
*/
-    if (!cp) {
+    /* context is NULL if context_foil() was called to disable use of context
+     * We also support users setting explicitly setting MHCONTEXT to /dev/null.
+     * (if this wasn't specialcased then the locking would be liable to fail)
+     */
+    if (!cp || (strcmp(cp,"/dev/null") == 0)) {
        ctxpath = NULL;
        return;
     }

-- PMM


_______________________________________________
Nmh-workers mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to