summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorkre <kre@NetBSD.org>2021-09-15 20:21:47 +0000
committerkre <kre@NetBSD.org>2021-09-15 20:21:47 +0000
commit0c0cad4987966d3dcc4adab9a030b4bfce7a7619 (patch)
treeb37f4d034f70a87f8a2d20ed9e63f728a23e31c3 /sys/dev/microcode
parenta0cb7535c6b2937ed8783997ec108c958a962194 (diff)
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].
Diffstat (limited to 'sys/dev/microcode')
0 files changed, 0 insertions, 0 deletions