Re: fd leak with {fd}>

2012-11-22 Thread Pierre Gaston
On Thu, Nov 22, 2012 at 9:15 PM, Chet Ramey wrote: > On 11/16/12 10:47 AM, Sam Liddicott wrote: > > Repeated executions of: { echo $fd ; } {fd}> /dev/null > > will emit different numbers, indicating that fd is not closed when the > > block completes. > > This is intentional. Having been given a

Re: fd leak with {fd}>

2012-11-22 Thread Sam Liddicott
On Thu, Nov 22, 2012 at 7:15 PM, Chet Ramey wrote: > On 11/16/12 10:47 AM, Sam Liddicott wrote: > > Repeated executions of: { echo $fd ; } {fd}> /dev/null > > will emit different numbers, indicating that fd is not closed when the > > block completes. > > This is intentional. Having been given a

Re: fd leak with {fd}>

2012-11-22 Thread Chet Ramey
On 11/16/12 10:47 AM, Sam Liddicott wrote: > Repeated executions of: { echo $fd ; } {fd}> /dev/null > will emit different numbers, indicating that fd is not closed when the > block completes. This is intentional. Having been given a handle to the file descriptor, the shell programmer is assumed t