--- st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/st.c b/st.c index e0aae9d..d2929d0 100644 --- a/st.c +++ b/st.c _AT_@ -1142,7 +1142,7 @@ die(const char *errstr, ...) { void execsh(void) { char **args; - char *envshell = getenv("SHELL"); + char *envshell; const struct passwd *pass = getpwuid(getuid()); char buf[sizeof(long) * 8 + 1]; _AT_@ -1156,7 +1156,6 @@ execsh(void) { setenv("SHELL", pass->pw_shell, 0); setenv("HOME", pass->pw_dir, 0); } - snprintf(buf, sizeof(buf), "%lu", xw.win); setenv("WINDOWID", buf, 1); _AT_@ -1167,7 +1166,8 @@ execsh(void) { signal(SIGTERM, SIG_DFL); signal(SIGALRM, SIG_DFL); - DEFAULT(envshell, shell); + if ((envshell = getenv("SHELL")) == NULL) + setenv("SHELL", envshell = shell, 1); setenv("TERM", termname, 1); args = opt_cmd ? opt_cmd : (char *[]){envshell, "-i", NULL}; execvp(args[0], args); -- 2.0.1Received on Thu Aug 07 2014 - 11:25:38 CEST
This archive was generated by hypermail 2.3.0 : Thu Aug 07 2014 - 11:36:06 CEST