Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15207 > unrolled thread

Re: leaks fd for internal functions but not external command

Started bySam Liddicott <sam@liddicott.com>
First post2019-07-23 16:11 +0100
Last post2019-07-23 16:11 +0100
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: leaks fd for internal functions but not external command Sam Liddicott <sam@liddicott.com> - 2019-07-23 16:11 +0100

#15207 — Re: leaks fd for internal functions but not external command

FromSam Liddicott <sam@liddicott.com>
Date2019-07-23 16:11 +0100
SubjectRe: leaks fd for internal functions but not external command
Message-ID<mailman.2076.1563894733.2688.bug-bash@gnu.org>
On Tue, 23 Jul 2019 at 16:05, Chet Ramey <chet.ramey@case.edu> wrote:

> 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.
>

evidently not, it got closed for me with /bin/echo so I couldn't use it as
I 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 report concerns the different behaviour with internal and external
operations.

Sam

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web