Re: [PATCH] perl Git.pm: don't ignore signalled failure in _cmd_close()
Æ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.
> 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.
>
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"}->();
> +}