aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-10-09 19:33:26 +0200
committerChristoph Lohmann <20h@r-36.net>2012-10-09 19:33:26 +0200
commitfa952e19019f4c5a693d5f0e1fa9ef182d5527e9 (patch)
treed5570772dcfb47a599e0606d1dd83e0918edee50
parent5967a7c0db8bbf113235d66653df934d59619b7c (diff)
downloadst-fa952e19019f4c5a693d5f0e1fa9ef182d5527e9.tar.gz
st-fa952e19019f4c5a693d5f0e1fa9ef182d5527e9.tar.bz2
If there is really someone without SHELL set, help him/her.
-rw-r--r--st.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/st.c b/st.c
index 693739e..43f5bc2 100644
--- a/st.c
+++ b/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");