do_for_each_reflog(): use a strbuf to hold logfile name
[gitweb.git] / git-svn.perl
index 570504cee760c678e52349a6967bba499bd629c0..f8e9ef0ea622ac52ab96eab435bc2a65bd70aba0 100755 (executable)
 $| = 1; # unbuffer STDOUT
 
 sub fatal (@) { print STDERR "@_\n"; exit 1 }
+
+# All SVN commands do it.  Otherwise we may die on SIGPIPE when the remote
+# repository decides to close the connection which we expect to be kept alive.
+$SIG{PIPE} = 'IGNORE';
+
 sub _req_svn {
        require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
        require SVN::Ra;
@@ -4065,7 +4070,7 @@ sub rev_map_set {
        if ($update_ref) {
                $sigmask = POSIX::SigSet->new();
                my $signew = POSIX::SigSet->new(SIGINT, SIGHUP, SIGTERM,
-                       SIGALRM, SIGPIPE, SIGUSR1, SIGUSR2);
+                       SIGALRM, SIGUSR1, SIGUSR2);
                sigprocmask(SIG_BLOCK, $signew, $sigmask) or
                        croak "Can't block signals: $!";
        }