NetBSD/bin/sh
kre 51a7b24283 Fix an ordering error in the previous (and even earlier, going back
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].
2021-09-15 20:21:47 +00:00
..
USD.doc
bltin Fix a bug in the built-in echo in /bin/sh reported in private mail by 2021-05-18 21:39:06 +00:00
funcs
Makefile Add -I to find filecomplete.h 2021-08-15 11:57:17 +00:00
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 Related to PR bin/48875 2021-04-04 13:24:07 +00:00
eval.h
exec.c PR bin/55979 2021-02-16 15:30:12 +00:00
exec.h
expand.c bin: remove unnecessary lint comment CONSTCOND 2021-09-10 22:11:03 +00:00
expand.h When expanding a here-doc (NXHERE - the type with an unquoted end delim) 2020-02-13 05:19:05 +00:00
histedit.c Quote the filenames like before 2021-09-14 15:04:09 +00:00
init.h
input.c PR bin/55979 2021-02-16 15:30:26 +00:00
input.h
jobs.c Don't dereference NULL on "jobs -Z" (with no title given), instead 2021-09-12 01:30:41 +00:00
jobs.h Add jobs -Z (like in zsh(1)) to setproctitle(3). 2021-09-11 20:43:32 +00:00
machdep.h
mail.c
mail.h
main.c Improve the solution for the 2nd access to a fd which shouldn't 2021-09-15 18:29:45 +00:00
main.h
memalloc.c
memalloc.h
miscbltin.c Have the ulimit command watch for ulimit -n (alter number of available fds) 2021-09-15 18:30:57 +00:00
miscbltin.h
mkbuiltins
mkinit.sh
mknodenames.sh
mknodes.sh
mkoptions.sh
mktokens
myhistedit.h - Add command completion (from FreeBSD) 2021-08-15 10:17:55 +00:00
mystring.c
mystring.h
nodes.c.pat
nodetypes
option.list
options.c Oops, the previous didn't do what was promised. Rather that ignoring 2020-02-05 14:56:25 +00:00
options.h
output.c
output.h
parser.c Improve the solution for the 2nd access to a fd which shouldn't 2021-09-15 18:29:45 +00:00
parser.h
redir.c Fix an ordering error in the previous (and even earlier, going back 2021-09-15 20:21:47 +00:00
redir.h Improve the solution for the 2nd access to a fd which shouldn't 2021-09-15 18:29:45 +00:00
sh.1 Have the ulimit command watch for ulimit -n (alter number of available fds) 2021-09-15 18:30:57 +00:00
shell.h bin: remove unnecessary lint comment CONSTCOND 2021-09-10 22:11:03 +00:00
show.c bin: remove unnecessary lint comment CONSTCOND 2021-09-10 22:11:03 +00:00
show.h
syntax.c
syntax.h
trap.c Be less conservative about when we do clear_traps() when we have 2020-08-20 23:09:56 +00:00
trap.h
var.c Fix the fix to a typo in one of the comments. 2021-08-09 11:29:30 +00:00
var.h
version.h