Explorar el Código

If there is really someone without SHELL set, help him/her.

Christoph Lohmann hace 12 años
padre
commit
eb6713acf1
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      st.c

+ 3 - 0
st.c

@@ -865,6 +865,9 @@ execsh(void) {
 	char **args;
 	char *envshell = getenv("SHELL");
 
+	if (envshell == NULL)
+		envshell ="/bin/sh";
+
 	unsetenv("COLUMNS");
 	unsetenv("LINES");
 	unsetenv("TERMCAP");