On 8/23/23 9:50 AM, Zachary Santer wrote:
In the Bash man page:
varredir_close
If set, the shell automatically closes file descriptors assigned
using the {varname} redirection syntax (see REDIRECTION above) instead of
leaving them open when the command completes.
I feel like the man page would benefit from that caveat about exec. I felt
the need to test that bit myself. "Surely not."
That addresses the aspect of the behavior that people complain about. If
you use `exec', you want the redirections to persist -- that's the purpose
of using redirections with exec.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/