Index: 
region.c===================================================================
RCS file: /cvs/src/usr.bin/mg/region.c,v
retrieving revision 1.40
diff -u -p -r1.40 region.c
--- region.c      8 Mar 2023 04:43:11 -0000     1.40
+++ region.c      27 Mar 2023 16:38:41 -0000
@@ -21,6 +21,7 @@
&nbsp;#include <stdlib.h&gt;
&nbsp;#include <string.h&gt;
&nbsp;#include <unistd.h&gt;
+#include <paths.h&gt;
&nbsp;
&nbsp;#include "def.h"
&nbsp;
@@ -486,9 +487,8 @@ shellcmdoutput(char* const argv[], char*
&nbsp;           return (FALSE);
&nbsp;     }
&nbsp;
-     shellp = getenv("SHELL");
-
-     ret = pipeio(shellp, argv, text, len, bp);
+     ret = pipeio((shellp = getenv("SHELL")) == NULL ? _PATH_BSHELL : shellp,
+            &nbsp; &nbsp; argv, text, len, bp);
&nbsp;
&nbsp;     if (ret == TRUE) {
&nbsp;           eerase();

Reply via email to