From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: Force Charlie via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Force Charlie <charlieio@outlook.com>
Subject: Re: [PATCH] Correctly initialize 'installed_handlers'
Date: Fri, 8 May 2020 01:33:40 -0700 [thread overview]
Message-ID: <20200508083340.GA36538@Carlos-MBP> (raw)
In-Reply-To: <pull.630.git.1588921514146.gitgitgadget@gmail.com>
On Fri, May 08, 2020 at 07:05:13AM +0000, Force Charlie via GitGitGadget wrote:
> From: Force Charlie <charlieio@outlook.com>
>
> Because static variables are not initialized properly,
what do you mean by "properly"?, all static variables are set to 0;
that is a warranty of the language (all the way to K&R) and any C compiler
should enforce that as part of the standard.
> temporary files may not be deleted when receive-pack receives a signal.
the way this is handled would seem to indicate otherwise
if (!installed_handlers) {
atexit(remove_tmp_objdir);
sigchain_push_common(remove_tmp_objdir_on_signal);
installed_handlers++;
}
there is no explicit locking and so there might be a thread race
condition, but the code below wouldn't make a difference in that
case.
could you elaborate more on how to reproduce the problem?, I suspect
that if there was a problem then suppressing whatever signal that
was triggered before sigchain_push_common might help, but the window
is too short to be a likely issue.
Carlo
next prev parent reply other threads:[~2020-05-08 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 7:05 [PATCH] Correctly initialize 'installed_handlers' Force Charlie via GitGitGadget
2020-05-08 8:33 ` Carlo Marcelo Arenas Belón [this message]
2020-05-08 15:36 ` Junio C Hamano
2020-05-08 17:24 ` 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=20200508083340.GA36538@Carlos-MBP \
--to=carenas@gmail.com \
--cc=charlieio@outlook.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@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