Re: {varname} redirection for a command or group leaves the file open
From:
Aldo Davide
Subject:
Re: {varname} redirection for a command or group leaves the file open
Date:
Thu, 11 May 2017 12:13:54 +0200
On Wed, May 10, 2017 at 8:52 PM, Pierre Gaston <pierre.gaston@gmail.com> wrote:
> See:
>https://lists.gnu.org/archive/html/bug-bash/2012-11/msg00040.html[https://lists.gnu.org/archive/html/bug-bash/2012-11/msg00040.html]
> Pierre
> PS: I'm with you ;)
Thanks for the link, I didn't find it in my earlier searches.
Well, that's disappointing. So there is no technical reason for this behavior
other than copying the behavior of ksh. BTW zsh does the right thing and in the
following scenario:
ls -lh /proc/self/fd {fd}>/dev/null
and it closes the file descriptor after the command has completed.