summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c72e0db)
raw | patch | inline | side by side (parent: c72e0db)
author | Abhijit Menon-Sen <ams@toroid.org> | |
Mon, 4 Aug 2008 11:38:27 +0000 (17:08 +0530) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 5 Aug 2008 04:51:17 +0000 (21:51 -0700) |
Git::DESTROY calls _close_cat_blob and _close_hash_and_insert_object,
which in turn call command_close_bidi_pipe, which calls waitpid, which
alters $?. If this happens during global destruction, it may alter the
program's exit status unexpectedly. Making $? local to the function
solves the problem.
(The problem was discovered due to a failure of test #8 in
t9106-git-svn-commit-diff-clobber.sh.)
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
which in turn call command_close_bidi_pipe, which calls waitpid, which
alters $?. If this happens during global destruction, it may alter the
program's exit status unexpectedly. Making $? local to the function
solves the problem.
(The problem was discovered due to a failure of test #8 in
t9106-git-svn-commit-diff-clobber.sh.)
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm | patch | blob | history |
diff --git a/perl/Git.pm b/perl/Git.pm
index 087d3d0e829ce0e9b39c581bc9f088f0d72e36f3..faaa19f62e9a0f2f895853043e5aa163888bb13c 100644 (file)
--- a/perl/Git.pm
+++ b/perl/Git.pm
=cut
sub command_close_bidi_pipe {
+ local $?;
my ($pid, $in, $out, $ctx) = @_;
foreach my $fh ($in, $out) {
unless (close $fh) {