[Top][All Lists]

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

Re: fd leak with {fd}>

From: Dennis Williamson
Subject: Re: fd leak with {fd}>
Date: Mon, 26 Nov 2012 17:30:44 -0600

On Nov 26, 2012 2:48 PM, "Chet Ramey" <address@hidden> wrote:
> On 11/26/12 12:11 PM, Sam Liddicott wrote:
> > I explained how in the lines of my response that you deleted.
> >
> > It is potentially useless because:
> >
> > 1. it is non-obvious, most users will not expect this behaviour (unless
> > already initiated into the secret) and so will not try to get that
> OK, so there's a need for documentation on how it differs from anonymous
> or, in certain circumstances, explicitly numbered redirections.
> > 2. it is an unexpected side effect and will do something which is not
> > expected, and be widely and "wrongly" labelled as buggy or unreliable by
> > misunderstanding users and therefore damage the bash reputation.
> Hmmm...again, it's a new feature which shares some things with the old but
> has its own behavior.  Think of it as something closer to open/fcntl than
> the historical redirections.  The differences can be made more apparent
> with better documentation.  Certainly nobody has used it by accident
> before.
> > 3. there already exists simple and explicit way to get the supposed
> > using the existing mechanism "exec"
> Not quite.  You still have to pick the file descriptor you want to use
> `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.
> Chet

Case modification in Bash is a highly viewed and highly upvoted question on
Stack Overflow.


> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    address@hidden

reply via email to

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