51a7b24283
a way, but made more serious with the recent changes). The n>&n operation (more or less a no-op, except it clears CLOEXEC) should precede almost everything else - and simply be made to fail if an attempt is made to apply it to a sh internal fd. We were renumbering the internal fd (the n> part considered first) which was dumb, but OK, before, but now rejecting the operation (the >&n) part when n should not be visible to the script. That made something of a mess (and could lead to the shell believing its job control tty was at a fd it never got moved to). Do things in the correct order, and simply fail that case for internal fds (for every other n>xxx for any xxx sh simply renumbers its internal fd n to some other fd before attempting the operation, even n>&- ... those are all fine). [In all the above the '>' is used in place of any redirect operator]. |
||
---|---|---|
.. | ||
USD.doc | ||
bltin | ||
funcs | ||
Makefile | ||
TOUR | ||
alias.c | ||
alias.h | ||
arith_token.c | ||
arith_tokens.h | ||
arithmetic.c | ||
arithmetic.h | ||
builtins.def | ||
cd.c | ||
cd.h | ||
error.c | ||
error.h | ||
eval.c | ||
eval.h | ||
exec.c | ||
exec.h | ||
expand.c | ||
expand.h | ||
histedit.c | ||
init.h | ||
input.c | ||
input.h | ||
jobs.c | ||
jobs.h | ||
machdep.h | ||
mail.c | ||
mail.h | ||
main.c | ||
main.h | ||
memalloc.c | ||
memalloc.h | ||
miscbltin.c | ||
miscbltin.h | ||
mkbuiltins | ||
mkinit.sh | ||
mknodenames.sh | ||
mknodes.sh | ||
mkoptions.sh | ||
mktokens | ||
myhistedit.h | ||
mystring.c | ||
mystring.h | ||
nodes.c.pat | ||
nodetypes | ||
option.list | ||
options.c | ||
options.h | ||
output.c | ||
output.h | ||
parser.c | ||
parser.h | ||
redir.c | ||
redir.h | ||
sh.1 | ||
shell.h | ||
show.c | ||
show.h | ||
syntax.c | ||
syntax.h | ||
trap.c | ||
trap.h | ||
var.c | ||
var.h | ||
version.h |