# git svn exits with error error closing pipe: Bad file descriptor

1 messages from 2013-07-18 to 2013-07-18. Participants: Kacper Kornet.
Thread: https://gitlist.dev/t/34464

## Kacper Kornet, 2013-07-18 12:52

Subject: git svn exits with error error closing pipe: Bad file descriptor
Message-ID: <20130718125207.GA14823@camk.edu.pl>
URL: https://gitlist.dev/e/20130718125207.GA14823%40camk.edu.pl

```
After upgrade to subversion 1.8.0 on some repositories
git svn clone shows two warnings:

error closing pipe: Bad file descriptor at
/home/users/kornet/giti/libexec/git-core/git-svn line 0.

at exit. They appear because process git cat-file --batch exits before
command_close_bidi_pipe is called by destructor during perl exit.  The
solution is to call the destructor explicitly, e.q.:

index ff1ce3d..6811738 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2068,6 +2068,10 @@ sub gc_directory {
        }
 }
 
+END {
+    undef $_repository;
+}
+
 __END__
 
 Data structures:

However I'm not sure whether it is not a symptom of some other error.
What's confuses me more is that the warnings don't appear for all
repositories. For example they appear for  http://svn.pld-linux.org/svn/cdpl/
while cloning http://svn.pld-linux.org/svn/atob ends normally.
On the other hand it is consistent between two different machines with
different Linux distributions and perl versions.

-- 
  Kacper Kornet

```
