Date: Sun, 29 Oct 2017 21:47:43 +0000 From: Martijn Dekker <mart...@inlv.org> Message-ID: <6432d459-75de-0afe-6716-7960e7a0a...@inlv.org>
| | In all cases, explicit redirection of standard input shall | | override this activity. That last sentence just shouldn't be there - it already says that the implicit redirect to /dev/null happens before explicit redirects, which is all that is really needed to explain what happens (that was just (trying to) emphasise that the /dev/null redirect doesn't override a </other/place that might be attached to the command.) But even if left there, since the implicit redirect must be done first (when it is done) the "<&0" which is performed later is just redirecting what is on fd 0 at the time it is performed (/dev/null in this case) to std input (ie: like in any other case, that redirect is a no-op.) Note unlike the wording for job control, where the /dev/null redirect "shall not happen", in the explicit redirection case, it does still happen, but is overridden. Which is to say the explicit < wins, but it runs in the context of the implicit redirect having already taken place. kre