bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obscure issue with process substitution since bash-5.0.016 upgrade


From: Joan Bruguera Micó
Subject: Re: Obscure issue with process substitution since bash-5.0.016 upgrade
Date: Thu, 2 Apr 2020 04:49:03 +0200

Apologies, since after reading the other bug report more thoroughly, I
understood that a fix for that issue has actually already been commited to
the devel branch at this point, and indeed, I can also not reproduce my
issue on the latest snapshot. So it looks like this has already been
addressed.

Therefore, ignore my previous email and consider this solved.

Regards,
- Joan Bruguera



On Thu, 2 Apr 2020 at 04:15, Joan Bruguera Micó <joanbrugueram@gmail.com>
wrote:

> I'm having a problem with a script that used to work, which I reduced
> to the following test case:
>
>     #!/bin/bash
>
>     function docat() {
>         for x in 1 2 3 ; do true; done
>         cat "$@"
>     }
>
>     for x in $(seq 25); do
>         docat <(echo a) <(echo a) <(echo a) <(echo a) <(echo a) <(echo a)
>     done
>
> Expected behaviour: A lot of lines with an "a" are printed
>
> Actual behaviour: Some lines with an "a" are printed but a lot of
> prints fail with an error:
>
>     [...]
>     a
>     cat: /dev/fd/63: No such file or directory
>     cat: /dev/fd/62: No such file or directory
>     cat: /dev/fd/61: No such file or directory
>     cat: /dev/fd/60: No such file or directory
>     a
>     [...]
>
> Now if you remove the apparently useless for loop in the first line of
> docat, this works as I would expect. It also works on zsh.
>
> After some head banging I found that what makes the difference is the
> latest bash update, bash-5.0.016. On bash-5.0.015 this script works,
> so the the patch that makes the difference is this one:
> https://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-016
>
> Was the script technically wrong but worked due to some bash
> implementation detail, or is this could actually a problem with bash?
>
> I found a very similar report in
> https://lists.gnu.org/archive/html/bug-bash/2020-03/msg00062.html ,
> but I'm not sure if it's the same underlying issue, since that
> particular case is said to be introduced between 4.4-5.0, and this one
> is between 5.0.015-5.0.016, and no fix is yet available to test.
>
> Thanks for your help,
> - Joan Bruguera
>
> PS: This is the first time I post to the mailing list, so preemptive
> apologies for any mistake I could have made.
>


-- 

*Joan Bruguera Micó* - PGP key id: 88A7 A061 6B47 0CE1 EB4E  D431 8744 44D1
21CE B72E


reply via email to

[Prev in Thread] Current Thread [Next in Thread]