aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-04-27 00:04:29 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-04-27 00:04:29 +0200
commit476f93794acc36ea69dfd33551e311863c8afc9a (patch)
tree8ebe870228fa4a14716b3e0b7887aa01bace7f95
parentd01c55c9ab58588d98239c515aa8db6443ae75ca (diff)
downloadst-476f93794acc36ea69dfd33551e311863c8afc9a.tar.gz
st-476f93794acc36ea69dfd33551e311863c8afc9a.zip
little clean up.
-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