From: Richard M Kreuter Date: Wed, 20 Jan 2016 02:39:11 +0000 (-0500) Subject: Set MH to the resolved, absolute pathname inside context_read() so X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/905a55aa51624a993b54ebeee399cba2a32bcae6?ds=inline;hp=85bc89701507a525c54f2c38dfbad852802c2fc1 Set MH to the resolved, absolute pathname inside context_read() so that exec'd children can find it. --- diff --git a/sbr/context_read.c b/sbr/context_read.c index 8f63fedf..80340688 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -65,6 +65,8 @@ context_read (void) if ((cp = getenv("MH")) && *cp != '\0') { defpath = path(cp, TFILE); + /* defpath is an absolute path; make sure that always MH is, too. */ + setenv("MH", defpath, 1); if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0) adios((char *)0, "`%s' specified by your MH environment variable is not a normal file", cp);