summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorChristoph Lohmann2012-10-09 19:33:26 +0200
committerChristoph Lohmann2012-10-09 19:33:26 +0200
commiteb6713acf1928ec94364627ed583252370051705 (patch)
treed5570772dcfb47a599e0606d1dd83e0918edee50 /st.c
parent9e813947cf4631c0ca8e5f73ebfb269ef2f8252b (diff)
downloadst-eb6713acf1928ec94364627ed583252370051705.tar.gz
st-eb6713acf1928ec94364627ed583252370051705.tar.xz
st-eb6713acf1928ec94364627ed583252370051705.zip
If there is really someone without SHELL set, help him/her.
Diffstat (limited to 'st.c')
-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");