[Top][All Lists]

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

Re: fd leak with {fd}>

From: Pierre Gaston
Subject: Re: fd leak with {fd}>
Date: Tue, 27 Nov 2012 09:08:24 +0200

On Mon, Nov 26, 2012 at 10:48 PM, Chet Ramey <address@hidden> wrote:

> On 11/26/12 12:11 PM, Sam Liddicott wrote:
> > 3. there already exists simple and explicit way to get the supposed
> benefit
> > using the existing mechanism "exec"
> Not quite.  You still have to pick the file descriptor you want to use with
> `exec'.  But you are not being forced to use it -- by all means, if you
> think it's not what you need or want, feel free to avoid it and encourage
> your friends to do the same.  There have been unsuccessful new features --
> the case-modifying expansions are one example of a swing and miss.

You seem to say that there are 2 aspects of this new feature, giving
 control on the fd
and letting the system choose the number.

Let's see the first aspect, you are saying that leaving the fd open doing
"{ : } {fd}>file"
is a feature to let the user control the file descriptor.

But why would one use this when you can do:

exec {fd}>file

That is there is already exec to answer the problem of letting the user
manage the fd,
Why would you use another new, non intuitive non consistent feature?

For me having bashing assigning the fd number solves another problem.

reply via email to

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