Closing dump buffers on stream end
authorChristian Aistleitner <christian@quelltextlich.at>
Mon, 26 Mar 2012 09:26:48 +0000 (11:26 +0200)
committerChristian Aistleitner <christian@quelltextlich.at>
Mon, 26 Mar 2012 09:26:48 +0000 (11:26 +0200)
Change-Id: I7bef095f2f9189fb20064da4fd09ed4caa7a90e5

includes/Export.php

index 82aa946..0bddd4c 100644 (file)
@@ -794,6 +794,11 @@ class DumpFileOutput extends DumpOutput {
                $this->filename = $file;
        }
 
+       function writeCloseStream( $string ) {
+               parent::writeCloseStream( $string );
+               fclose( $this->handle );
+       }
+
        function write( $string ) {
                fputs( $this->handle, $string );
        }
@@ -854,6 +859,11 @@ class DumpPipeOutput extends DumpFileOutput {
                $this->filename = $file;
        }
 
+       function writeCloseStream( $string ) {
+               parent::writeCloseStream( $string );
+               proc_close( $this->procOpenResource );
+       }
+
        function startCommand( $command ) {
                $spec = array(
                        0 => array( "pipe", "r" ),