diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-04-27 00:04:29 +0200 | 
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-04-27 00:04:29 +0200 | 
| commit | 50d795d28c3f300e11b31503c8d20aeae20258fe (patch) | |
| tree | 8ebe870228fa4a14716b3e0b7887aa01bace7f95 | |
| parent | ba9e8eafe7f32a6f6b8e1c6b7f80c38d5a7df3d3 (diff) | |
| download | st-50d795d28c3f300e11b31503c8d20aeae20258fe.tar.xz st-50d795d28c3f300e11b31503c8d20aeae20258fe.zip | |
little clean up.
| -rwxr-xr-x | st.c | 8 | 
1 files changed, 3 insertions, 5 deletions
| @@ -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 | 
