Browse Source

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

Christoph Lohmann 12 năm trước cách đây
mục cha
commit
eb6713acf1
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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");