Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: File descriptor leakage?
- X-seq: zsh-users 19181
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: File descriptor leakage?
- Date: Sun, 28 Sep 2014 23:07:10 -0700
- Cc: lilydjwg <lilydjwg@xxxxxxxxx>
- In-reply-to: <20140929035338.GA29747@lilyforest>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author