[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitut
From: |
Piotr Grzybowski |
Subject: |
Re: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used |
Date: |
Thu, 12 Dec 2013 11:21:33 +0100 |
well, no argue there, I just wanted to point out that where /dev/fd/
is available this issue is noexistent.
if i find the bsd system i have access to, i can investigate further.
cheers,
pg
On Thu, Dec 12, 2013 at 10:41 AM, Yuri <yuri@rawbw.com> wrote:
> On 12/11/2013 22:53, Piotr Grzybowski wrote:
>
> Yuri: I have verified that under linux 3.2.0, bash-4.2.25, nothing of
> the sort takes place. tee gets /dev/fd/${somefd}, why it is not
> supported in bsd kernel i have no idea, but I thought it was. I've
> even built mplayer and run your script (btw. probably there is an
> easier way of doing what you want), I also performed some tests with
> command that actually outputs what grep looks for. Also please note
> that `command substitution`, or $(command substitution) is slightly
> different from >(process substitution).
>
>
> Piotr,
>
> /dev/fd/{somefd} is quite an advanced feature, and it can be/has been argued
> that it can lead to unpredictable behavior when file descriptors
> appear/disappear. So FreeBSD only implements fds 0,1,2. Even those can be
> closed too.
> There are some other systems without such feature, and bash should be fixed
> to work fine without it.
>
> Yuri