aboutsummaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/msh.c')
-rw-r--r--shell/msh.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 9e9b798a1..7371120ca 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -84,7 +84,6 @@ static char *itoa(int n)
84} 84}
85#else 85#else
86# include "busybox.h" /* for applet_names */ 86# include "busybox.h" /* for applet_names */
87extern char **environ;
88#endif 87#endif
89 88
90/*#define MSHDEBUG 1*/ 89/*#define MSHDEBUG 1*/
@@ -2825,11 +2824,13 @@ static int forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2825 2824
2826 if (pin != NULL) { 2825 if (pin != NULL) {
2827 xmove_fd(pin[0], 0); 2826 xmove_fd(pin[0], 0);
2828 if (pin[1] != 0) close(pin[1]); 2827 if (pin[1] != 0)
2828 close(pin[1]);
2829 } 2829 }
2830 if (pout != NULL) { 2830 if (pout != NULL) {
2831 xmove_fd(pout[1], 1); 2831 xmove_fd(pout[1], 1);
2832 if (pout[1] != 1) close(pout[0]); 2832 if (pout[1] != 1)
2833 close(pout[0]);
2833 } 2834 }
2834 2835
2835 iopp = t->ioact; 2836 iopp = t->ioact;
@@ -4181,7 +4182,8 @@ static int grave(int quoted)
4181 * echo "$files" >zz 4182 * echo "$files" >zz
4182 */ 4183 */
4183 xmove_fd(pf[1], 1); 4184 xmove_fd(pf[1], 1);
4184 if (pf[0] != 1) close(pf[0]); 4185 if (pf[0] != 1)
4186 close(pf[0]);
4185 4187
4186 argument_list[0] = (char *) DEFAULT_SHELL; 4188 argument_list[0] = (char *) DEFAULT_SHELL;
4187 argument_list[1] = (char *) "-c"; 4189 argument_list[1] = (char *) "-c";