diff options
author | Denis Vlasenko | 2008-02-16 13:18:17 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-16 13:18:17 +0000 |
commit | 284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch) | |
tree | 3cfcea06c5a5c9e454edd39b58111ef38810882c /shell/msh.c | |
parent | 069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff) | |
download | busybox-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip busybox-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz |
random s/short/int/
add_cmd 1189 1190 +1
xconnect_ftpdata 118 117 -1
data_align 86 84 -2
process_files 2101 2096 -5
forkexec 1345 1334 -11
Diffstat (limited to 'shell/msh.c')
-rw-r--r-- | shell/msh.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/shell/msh.c b/shell/msh.c index 6555604..fd287f1 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -2797,15 +2797,13 @@ static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp) if (!bltin) export(lookup(cp)); - if (pin) { + if (pin) { /* NB: close _first_, then move fds! */ + close(pin[1]); xmove_fd(pin[0], 0); - if (pin[1] != 0) - close(pin[1]); } if (pout) { + close(pout[0]); xmove_fd(pout[1], 1); - if (pout[0] > 1) - close(pout[0]); } iopp = t->ioact; |