pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d01c55c
)
little clean up.
author
Aurélien Aptel
<aurelien.aptel@gmail.com>
Mon, 26 Apr 2010 22:04:29 +0000
(
00:04
+0200)
committer
Aurélien Aptel
<aurelien.aptel@gmail.com>
Mon, 26 Apr 2010 22:04:29 +0000
(
00:04
+0200)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
ee79a33
..
ff43706
100755
(executable)
--- 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