bash script outputs "cannot make pipe for process substitution: Too many open files"

Solution Verified - Updated -

Issue

A pipe fd leak occurred in Process Substitution of bash script. As a result, bash script outputs the following message.

./test.sh: cannot make pipe for process substitution: Too many open files

Execute the following script to reproduce:

#!/bin/bash
sub(){
while :
do
/bin/true <(/bin/true)
done
}

sub
exit

Environment

  • Red Hat Enterprise Linux (RHEL) 6 and 7
  • bash

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content