Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15206
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: leaks fd for internal functions but not external command |
| Date | 2019-07-23 11:05 -0400 |
| Message-ID | <mailman.2075.1563894332.2688.bug-bash@gnu.org> (permalink) |
| References | <CAOj-5WDk=8kt=J8wO23giFVWRp5=_GbCNB2HQO87Upc4kkTg+g@mail.gmail.com> <5c34ecd5-c8b2-7000-46bc-1bbe3f71f163@case.edu> |
On 7/23/19 10:33 AM, Sam Liddicott wrote: > Bash Version: 4.4 > Patch Level: 20 > Release Status: release > > Description: > Bash redirection sequence cases a file descriptor to be leaked > if the main command is an internal function but not if it is > an external command. It's not `leaked': you have a handle on it and can manipulate it as you wish. > Based on prior conversation, I suspect it is supposed to leak > in the internal case (though that is annoying) but it is > inconsistent that it does not for the external case. It's set to close-on-exec. If you want to use it in a child process, you have a handle that you can use to dup to another fd. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: leaks fd for internal functions but not external command Chet Ramey <chet.ramey@case.edu> - 2019-07-23 11:05 -0400
csiph-web