summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-10-09 19:40:37 +0200
committerChristoph Lohmann <20h@r-36.net>2012-10-09 19:40:37 +0200
commit2e38ab7afdc56e3853751918f1b7705362bea01c (patch)
tree14b3d5defce72a81e176029c2e5b8c1becd2131e
parentIf there is really someone without SHELL set, help him/her. (diff)
downloadst-2e38ab7afdc56e3853751918f1b7705362bea01c.tar.gz
st-2e38ab7afdc56e3853751918f1b7705362bea01c.zip
Well, I was confused. Damn state exams. Instead of discussing this shit I
should really learn opthalmology instead. :O
Diffstat (limited to '')
-rw-r--r--st.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/st.c b/st.c
index 43f5bc2..f967d2c 100644
--- a/st.c
+++ b/st.c
@@ -865,9 +865,6 @@ execsh(void) {
865 char **args; 865 char **args;
866 char *envshell = getenv("SHELL"); 866 char *envshell = getenv("SHELL");
867 867
868 if (envshell == NULL)
869 envshell ="/bin/sh";
870
871 unsetenv("COLUMNS"); 868 unsetenv("COLUMNS");
872 unsetenv("LINES"); 869 unsetenv("LINES");
873 unsetenv("TERMCAP"); 870 unsetenv("TERMCAP");
@@ -881,7 +878,7 @@ execsh(void) {
881 878
882 DEFAULT(envshell, SHELL); 879 DEFAULT(envshell, SHELL);
883 putenv("TERM="TNAME); 880 putenv("TERM="TNAME);
884 args = opt_cmd ? opt_cmd : (char*[]){envshell, "-i", NULL}; 881 args = opt_cmd ? opt_cmd : (char *[]){envshell, "-i", NULL};
885 execvp(args[0], args); 882 execvp(args[0], args);
886 exit(EXIT_FAILURE); 883 exit(EXIT_FAILURE);
887} 884}