little clean up.

dev
Aurélien Aptel 2010-04-27 00:04:29 +02:00
parent d01c55c9ab
commit 476f93794a
1 changed files with 3 additions and 5 deletions

8
st.c
View File

@ -208,12 +208,10 @@ die(const char *errstr, ...) {
void void
execsh(void) { execsh(void) {
char *shell = getenv("SHELL"); char *args[3] = {getenv("SHELL"), "-i", NULL};
if(!shell) DEFAULT(args[0], "/bin/sh"); /* default shell if getenv() failed */
shell = "/bin/sh";
char *args[3] = {shell, "-i", NULL};
putenv("TERM=" TNAME); putenv("TERM=" TNAME);
execvp(shell, args); execvp(args[0], args);
} }
void void