aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xst.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/st.c b/st.c
index ee79a33..ff43706 100755
--- a/st.c
+++ b/st.c
@@ -208,12 +208,10 @@ die(const char *errstr, ...) {
208 208
209void 209void
210execsh(void) { 210execsh(void) {
211 char *shell = getenv("SHELL"); 211 char *args[3] = {getenv("SHELL"), "-i", NULL};
212 if(!shell) 212 DEFAULT(args[0], "/bin/sh"); /* default shell if getenv() failed */
213 shell = "/bin/sh";
214 char *args[3] = {shell, "-i", NULL};
215 putenv("TERM=" TNAME); 213 putenv("TERM=" TNAME);
216 execvp(shell, args); 214 execvp(args[0], args);
217} 215}
218 216
219void 217void