From 66c5335d29a67b86cbc6a91f082dd18b0a35274a Mon Sep 17 00:00:00 2001 From: Christian Aistleitner Date: Mon, 26 Mar 2012 11:26:48 +0200 Subject: [PATCH] Closing dump buffers on stream end Change-Id: I7bef095f2f9189fb20064da4fd09ed4caa7a90e5 --- includes/Export.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/Export.php b/includes/Export.php index 82aa9465aa..0bddd4ccb9 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -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" ), -- 2.20.1