title: What happens to /proc/self/fd/4 in this example?
body: <p>With bash 3.00.15(1):</p>
  
  <pre><code>$ ls /proc/self/fd 4&lt;&amp;1
  0 1 2 3 4
  $ echo | ls /proc/self/fd 4&lt;&amp;1
  0 1 2 3 4
  $ ls() { /bin/ls $*; }
  $ ls /proc/self/fd 4&lt;&amp;1
  0 1 2 3 4
  $ echo | ls /proc/self/fd 4&lt;&amp;1   # Unexpected output
  0 1 2 3
  </code></pre>
  
  <p>This seems like a bash bug, as the behavior in dash and zsh is different (and the behavior in bash is not what I expect).  Change the dup'd descriptor to 5, and the final output is as expected.  </p>
  
  <p>Any thoughts as to what is happening to cause this behavior?</p>