From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: John Cai via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>,
Phillip Wood <phillip.wood123@gmail.com>,
Jeff King <peff@peff.net>, John Cai <johncai86@gmail.com>
Subject: Re: [PATCH v3] tmp-objdir: skip clean up when handling a signal
Date: Wed, 28 Sep 2022 17:38:21 +0200 [thread overview]
Message-ID: <220928.86leq3wlnf.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <pull.1348.v3.git.git.1664376956780.gitgitgadget@gmail.com>
On Wed, Sep 28 2022, John Cai via GitGitGadget wrote:
> From: John Cai <johncai86@gmail.com>
This looks good! Just a clarifying question/comment:
> Since we can't do the cleanup in a portable and signal-safe way, skip
> the cleanup when we're handling a signal.
>
> This means that when signal handling, the temporary directory may not
> get cleaned up properly. This is mitigated by b3cecf49ea (tmp-objdir: new
> API for creating temporary writable databases, 2021-12-06) which changed
> the default name and allows gc to clean up these temporary directories.
I think this still doesn't cover the common case of the "atexit" handler
saving the day, as Jeff King pointed out in v1:
https://lore.kernel.org/git/YzLiI1HZeBszsIJq@coredump.intra.peff.net/
I think it's fine to have this proceed as-is (although if you're doing a
v4 anyway, maybe we want to update tho commit message). I.e. is it
correct that we'll now only skip this if we get a signal, *and* it's a
fatal signal, or we otherwise die/exit/abort/whatever before we can get
to our atexit() handler?
next prev parent reply other threads:[~2022-09-28 15:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 23:53 [PATCH] tmp-objdir: do not opendir() when handling a signal John Cai via GitGitGadget
2022-09-27 0:18 ` Taylor Blau
2022-09-27 11:48 ` Jeff King
2022-09-27 1:39 ` Junio C Hamano
2022-09-27 9:18 ` Phillip Wood
2022-09-27 11:44 ` Jeff King
2022-09-27 13:50 ` John Cai
2022-09-27 19:03 ` Jeff King
2022-09-27 16:50 ` Junio C Hamano
2022-09-27 19:19 ` [PATCH v2] tmp-objdir: skip clean up " John Cai via GitGitGadget
2022-09-27 19:38 ` Jeff King
2022-09-27 20:00 ` Jeff King
2022-09-28 14:55 ` [PATCH v3] " John Cai via GitGitGadget
2022-09-28 15:38 ` Ævar Arnfjörð Bjarmason [this message]
2022-09-30 20:47 ` [PATCH v4] " John Cai via GitGitGadget
2022-10-03 8:52 ` Jeff King
2022-10-20 11:58 ` Another possible instance of async-signal-safe opendir path callstack? (Was: [PATCH] tmp-objdir: do not opendir() when handling a signal) Jan Pokorný
2022-10-20 18:21 ` Jeff King
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=220928.86leq3wlnf.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johncai86@gmail.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
--cc=phillip.wood123@gmail.com \
/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.
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).