git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] perl Git.pm: don't ignore signalled failure in _cmd_close()

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2022, 21:58 UTC
Message-ID
<xmqqwnieb65t.fsf@gitster.g>
In-Reply-To
<patch-1.1-86353c3b366-20220201T205218Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 5 quoted lines
> 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.
Show 9 quoted lines
> +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"}->();
> +}
Previous: Ævar Arnfjörð Bjarmason
Message 2 of 2 in “perl Git.pm: don't ignore signalled failure in _cmd_close()”
  1. perl Git.pm: don't ignore signalled failure in _cmd_close()Ævar Arnfjörð Bjarmason, Feb 1, 2022
  2. Junio C HamanoFeb 1, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.