Ver Fonte

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

Christoph Lohmann há 12 anos atrás
pai
commit
eb6713acf1
1 ficheiros alterados com 3 adições e 0 exclusões
  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");