Harald van Dijk <[email protected]> wrote:
> On 23/04/2018 19:56, Martijn Dekker wrote:
>> $ dash -c '{ exec 8</dev/null; } 8<&-; : <&8 && echo "oops, still open"'
>> Output: "oops, still open"
>> Expected output: Bad file descriptor
>> 
>> Apparently, dash either fails to push the file descriptor onto the stack 
>> at '} 8<&-', or fails to restore it.
>> 
>> Same bug with loops ending in "done 8<&-".
>> 
>> Confirmed in all dash versions down to 0.5.5.1.
> 
> What surprises me most is that dash has code written specifically to 
> keep the fd closed. dash would be smaller and simpler if it behaved the 
> way you expected and the way most other shells behave: just remove all 
> traces of REALLY_CLOSED.

So did anything happen on the bash front? I'm happy to change if
bash moves in the same direction.

Cheers,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Reply via email to