bug-bash
[Top][All Lists]
Advanced

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

Re: Leak in BASH "named" file descriptors?


From: Mathieu Patenaude
Subject: Re: Leak in BASH "named" file descriptors?
Date: Thu, 28 Jan 2016 20:53:45 -0500

Yes, thanks, that part I figured out many lines of code ago ;-) 

Chet answer earlier today kind of closed the loop on my "observations".  By design, as soon as you work with FD by varname you have to do all the housekeeping (regardless on how you create them).  But, depending on how you use regular "numbered" FD, it's not always the case (easy to see in all the examples I sent).

On Thu, Jan 28, 2016 at 5:25 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
Mathieu Patenaude <mpatenaude@gmail.com> writes:

> The issue I see with relying on the bash EXIT to actually have the system
> do the cleanup is when you have a script that does things in a forever
> loop, you end up with FD exhaustion when using "named" FD and here strings.

Of course, if you don't close (or reuse) your descriptors you will run
out of them eventually.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


reply via email to

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