[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fd leak with {fd}>
From: |
Chet Ramey |
Subject: |
Re: fd leak with {fd}> |
Date: |
Mon, 26 Nov 2012 15:48:18 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
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 benefit.
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 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.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: fd leak with {fd}>, (continued)
- Re: fd leak with {fd}>, Chet Ramey, 2012/11/22
- Re: fd leak with {fd}>, Sam Liddicott, 2012/11/22
- Re: fd leak with {fd}>, Pierre Gaston, 2012/11/23
- Re: fd leak with {fd}>, Chet Ramey, 2012/11/26
- Re: fd leak with {fd}>, Pierre Gaston, 2012/11/26
- Re: fd leak with {fd}>, Pierre Gaston, 2012/11/26
- Re: fd leak with {fd}>, Sam Liddicott, 2012/11/26
- Re: fd leak with {fd}>, Chet Ramey, 2012/11/26
- Re: fd leak with {fd}>, Sam Liddicott, 2012/11/26
- Re: fd leak with {fd}>,
Chet Ramey <=
- Re: fd leak with {fd}>, Chris F.A. Johnson, 2012/11/26
- Re: fd leak with {fd}>, Dennis Williamson, 2012/11/26
- Re: fd leak with {fd}>, Chet Ramey, 2012/11/26
- Re: fd leak with {fd}>, Pierre Gaston, 2012/11/27
- Re: fd leak with {fd}>, Sam Liddicott, 2012/11/27
- Re: fd leak with {fd}>, Chet Ramey, 2012/11/26