Re: One Crash per Log-in Caused by: echo '' > >(echo)

2019-03-21 Thread Chet Ramey
On 3/12/19 3:58 AM, jake wrote:


> Machine Type: x86_64-redhat-linux-gnu
> 
> Bash Version: 4.4
> 
> Patch Level: 23
> 
> Release Status: release
> 
> 
> 
> Description:
> 
>     Under the circumstances described below, the following command crashes 
> Bash:
> 
>         
> 
>     echo '' > >(echo)
> 
>    
> 
>     Replacing '' with "", ' ', or " " has the same effect.
> 
>     
> 
>     Replacing >(echo) with >( echo ) has the same effect (spaces added).

I can't reproduce this using bash-4.4.23 (I used Fedora 29).

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: Too many open files

2019-03-21 Thread Chet Ramey
On 3/16/19 12:15 AM, sunnycemet...@gmail.com wrote:
> Hello.  Running the attached demonstration script results in the following
> errors, but I do not understand why:
> 
>> ./tmof: redirection error: cannot duplicate fd: Too many open files
>> ./tmof: cannot make pipe for process substitution: Too many open files
>> ./tmof: line 19: <( find "$d" -type f ): Too many open files
> 
> Removal of either the seemingly meaningless “if true” conditional or empty
> array declaration results in no error.  Could this be a bug?

Thanks for the report. The /dev/fd version of this code needs to reap
process substitutions a little more often. It can't be *too* aggressive,
since the fds can still be read even after the process generating the
data has terminated, but it can do a little more.

This will be fixed in the next devel branch push.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/