From fe52fe9957ce904a57f856716046276e8db72697 Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Thu, 7 Jun 2001 04:17:39 +0000 Subject: Fix for bug 21253: removing all single-parameter system() calls from Bugzilla Patch by Dave Miller r= tara@tequilarista.org --- syncshadowdb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'syncshadowdb') diff --git a/syncshadowdb b/syncshadowdb index 94e492044..985bd16b8 100755 --- a/syncshadowdb +++ b/syncshadowdb @@ -156,10 +156,13 @@ if ($syncall) { } Verbose("Locking entire database"); SendSQL($query); - my $tablelist = join(' ', @tables); my $tempfile = "data/tmpsyncshadow.$$"; Verbose("Dumping database to a temp file ($tempfile)."); - system("mysqldump -l -e $db_name $tablelist > $tempfile"); + open SAVEOUT, ">&STDOUT"; # stash the original output stream + open STDOUT, ">$tempfile"; # redirect to file + select STDOUT; $| = 1; # disable buffering + system("mysqldump","-l","-e",$db_name,@tables); + open STDOUT, ">&SAVEOUT"; # redirect back to original stream Verbose("Restoring from tempfile into shadowdb"); my $extra = ""; if ($verbose) { -- cgit v1.2.1