Re: Leak in BASH "named" file descriptors?

2016-01-28 Thread Mathieu Patenaude
ow 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 wrote: > Mathieu Patenaude writes: > > > The issue I see with relying on the bash EXIT to actually have the system > > do

Re: Leak in BASH "named" file descriptors?

2016-01-28 Thread Mathieu Patenaude
n the list / web, so I was really starting to think this was a bug. Maybe the "REDIRECTION" section of the BASH man page would be a good spot to mention this? Thanks to all for answering my questions, Math. On Thu, Jan 28, 2016 at 1:33 PM, Chet Ramey wrote: > On 1/27/16 1:18 PM,

Re: Leak in BASH "named" file descriptors?

2016-01-28 Thread Mathieu Patenaude
could delete the file here and wait for the # next time it appears, etc... Just an example. fi done 9<<<"file3" # we would normally wait some time here. #sleep 1 [[ $? -ne 0 ]] && exit $? done Again, thanks for looking into this weirdness. On Thu,

Re: Leak in BASH "named" file descriptors?

2016-01-28 Thread Mathieu Patenaude
h16098 mathp0u CHR 136,4 0t07 /dev/pts/4 bash16098 mathp1u CHR 136,4 0t0 7 /dev/pts/4 bash16098 mathp2u CHR 136,4 0t07 /dev/pts/4 bash16098 mathp 10r FIFO0,8 0t0 96683179 pipe Thanks! Math. On Thu, Jan 28

Leak in BASH "named" file descriptors?

2016-01-27 Thread Mathieu Patenaude
Hi, When using "named" file descriptors inside a function, the file descriptors are not automatically un-linked when the function returns, but when using regular "numbered" file descriptors they are automatically "destroyed". Not sure if it's "by" design or why it would be, but attached is a smal