package: bash
version: 4.1-3

The attached short script showcases the bug.  The important things
needed for it to be replicated, is that the loop *must* be run in a
function.  The inner <(pipeline) is where the leak takes place.  If
you don't have the complex if .. fi, then bash will never reap the
pipe descriptors, and eventually the limit of 1024 descriptors is hit.

If you run the script, and you get a 'Warning', then your bash is
leaking descriptors.

The work-around is also part of the script.  Run any sub-process in a
pipe.  The script does ": | :", as the shortest non-intrusive pipeline.

Attachment: pipe-leak-bug.sh
Description: Bourne shell script

Reply via email to