git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Eric Wong <e@80x24.org>
Subject: Re: [PATCH] perl Git.pm: don't ignore signalled failure in _cmd_close()
Date: Tue, 01 Feb 2022 13:58:38 -0800	[thread overview]
Message-ID: <xmqqwnieb65t.fsf@gitster.g> (raw)
In-Reply-To: <patch-1.1-86353c3b366-20220201T205218Z-avarab@gmail.com> ("Ævar	Arnfjörð Bjarmason"'s message of "Tue, 1 Feb 2022 21:52:52 +0100")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Fix misbehavior in Git.pm that dates back to the very first version of
> the library in git.git added in b1edc53d062 (Introduce Git.pm (v4),
> 2006-06-24). When we fail to execute a command we shouldn't ignore all
> signals, those can happen e.g. if abort() is called, or if the command
> segfaults.

Good find.

> All of our tests pass even without the SIGPIPE exception being added
> here, but as the code appears to have been trying to ignore it let's
> keep ignoring it for now.
>

Sounds OK-ish to me.

> +sub _is_sig {
> +	my ($v, $n) = @_;
> +
> +	# We are avoiding a "use POSIX qw(SIGPIPE SIGABRT)" in the hot
> +	# Git.pm codepath.
> +	require POSIX;
> +	no strict 'refs';
> +	$v == *{"POSIX::$n"}->();
> +}




      reply	other threads:[~2022-02-01 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 20:52 [PATCH] perl Git.pm: don't ignore signalled failure in _cmd_close() Ævar Arnfjörð Bjarmason
2022-02-01 21:58 ` Junio C Hamano [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqwnieb65t.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.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://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).