On 20/03/2025 11:04, Geoff Clare via austin-group-l at The Open Group wrote:
Chet Ramey wrote, on 18 Mar 2025:
The original language, from 1992, is "In all cases, explicit redirection
of standard input shall override this activity." Bash interpreted that to
mean that the implicit redirection of didn't happen.
The input we need from you on 0<&0 is, given that bash's behaviour
differs from the other shells whose behaviour we normally take into
consideration, do you think the resolution of bug 1913 should allow
the current bash behaviour or will you change bash to behave like
those other shells?
This is one corner case where bash's behaviour differs from other shells
but outside of that corner case, bash's behaviour matches other
significant shells and you are suggesting changing POSIX to no longer
permit this. Let me make this clearer with examples.
$ echo hello | bash -o posix -c "{ cat & wait; }"
$ echo hello | bash -o posix -c "{ cat & wait; } 0<&0"
hello
$ echo hello | ksh -o posix -c "{ cat & wait; }"
$ echo hello | ksh -o posix -c "{ cat & wait; } 0<&0"
hello
$ echo hello | bosh -c "{ cat & wait; }"
$ echo hello | bosh -c "{ cat & wait; } 0<&0"
hello
$ echo hello | pbosh -c "{ cat & wait; }"
$ echo hello | pbosh -c "{ cat & wait; } 0<&0"
hello
Cheers,
Harald van Dijk