浏览代码

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

Christoph Lohmann 12 年之前
父节点
当前提交
eb6713acf1
共有 1 个文件被更改,包括 3 次插入0 次删除
  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");