diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:18:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:18:17 +0000 |
commit | 284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch) | |
tree | 3cfcea06c5a5c9e454edd39b58111ef38810882c /shell | |
parent | 069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff) | |
download | busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.bz2 busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip |
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')
-rw-r--r-- | shell/hush.c | 2 | ||||
-rw-r--r-- | shell/msh.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/shell/hush.c b/shell/hush.c index 3f4610391..8afa15e89 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -3243,7 +3243,7 @@ static FILE *generate_stream_from_list(struct pipe *head) | |||
3243 | if (pid == 0) { /* child */ | 3243 | if (pid == 0) { /* child */ |
3244 | if (ENABLE_HUSH_JOB) | 3244 | if (ENABLE_HUSH_JOB) |
3245 | die_sleep = 0; /* let nofork's xfuncs die */ | 3245 | die_sleep = 0; /* let nofork's xfuncs die */ |
3246 | close(channel[0]); | 3246 | close(channel[0]); /* NB: close _first_, then move fd! */ |
3247 | xmove_fd(channel[1], 1); | 3247 | xmove_fd(channel[1], 1); |
3248 | /* Prevent it from trying to handle ctrl-z etc */ | 3248 | /* Prevent it from trying to handle ctrl-z etc */ |
3249 | #if ENABLE_HUSH_JOB | 3249 | #if ENABLE_HUSH_JOB |
diff --git a/shell/msh.c b/shell/msh.c index 65556043d..fd287f16e 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) | |||
2797 | if (!bltin) | 2797 | if (!bltin) |
2798 | export(lookup(cp)); | 2798 | export(lookup(cp)); |
2799 | 2799 | ||
2800 | if (pin) { | 2800 | if (pin) { /* NB: close _first_, then move fds! */ |
2801 | close(pin[1]); | ||
2801 | xmove_fd(pin[0], 0); | 2802 | xmove_fd(pin[0], 0); |
2802 | if (pin[1] != 0) | ||
2803 | close(pin[1]); | ||
2804 | } | 2803 | } |
2805 | if (pout) { | 2804 | if (pout) { |
2805 | close(pout[0]); | ||
2806 | xmove_fd(pout[1], 1); | 2806 | xmove_fd(pout[1], 1); |
2807 | if (pout[0] > 1) | ||
2808 | close(pout[0]); | ||
2809 | } | 2807 | } |
2810 | 2808 | ||
2811 | iopp = t->ioact; | 2809 | iopp = t->ioact; |