From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Cc: lilydjwg <lilydjwg@gmail.com>
Subject: Re: File descriptor leakage?
Date: Sun, 28 Sep 2014 23:07:10 -0700 [thread overview]
Message-ID: <140928230710.ZM5202@torch.brasslantern.com> (raw)
In-Reply-To: <20140929035338.GA29747@lilyforest>
On Sep 29, 11:53am, lilydjwg wrote:
}
} I discover that my zsh keeps a file descriptor to a deleted
} ".histfile.new" file:
This is the file created when the HIST_SAVE_BY_COPY option is set, which
is then renamed to the name given by $HISTFILE after being written. I
don't know of any reason the behavior for this would have changed from
5.0.5 to 5.0.6, but it's possible that workers/33116 is related.
There is an assumption that
fd = open(file, O_WRONLY, 0600);
out = fdopen(fd, "w");
fclose(out);
will close fd, but that assumption has been there for as long as the
HIST_SAVE_BY_COPY option has existed.
next prev parent reply other threads:[~2014-09-29 6:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 3:53 lilydjwg
2014-09-29 6:07 ` Bart Schaefer [this message]
2014-09-29 10:47 ` lilydjwg
2014-09-29 10:59 ` Peter Stephenson
2014-09-29 13:58 ` lilydjwg
2014-09-29 14:03 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=140928230710.ZM5202@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=lilydjwg@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).