X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=ff437062fefe13427214be2eabff74132656907f;hb=476f93794acc36ea69dfd33551e311863c8afc9a;hp=ee79a33759fd23cbbd8e15c064c664974d7a29a8;hpb=d01c55c9ab58588d98239c515aa8db6443ae75ca;p=st.git 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, ...) { void execsh(void) { - char *shell = getenv("SHELL"); - if(!shell) - shell = "/bin/sh"; - char *args[3] = {shell, "-i", NULL}; + char *args[3] = {getenv("SHELL"), "-i", NULL}; + DEFAULT(args[0], "/bin/sh"); /* default shell if getenv() failed */ putenv("TERM=" TNAME); - execvp(shell, args); + execvp(args[0], args); } void