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
This commit is contained in:
Denis Vlasenko
2008-02-16 13:18:17 +00:00
parent 069e347863
commit 284d0faed6
17 changed files with 46 additions and 42 deletions

View File

@ -3243,7 +3243,7 @@ static FILE *generate_stream_from_list(struct pipe *head)
if (pid == 0) { /* child */
if (ENABLE_HUSH_JOB)
die_sleep = 0; /* let nofork's xfuncs die */
close(channel[0]);
close(channel[0]); /* NB: close _first_, then move fd! */
xmove_fd(channel[1], 1);
/* Prevent it from trying to handle ctrl-z etc */
#if ENABLE_HUSH_JOB

View File

@ -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;