Skip to content

Commit

Permalink
Merge branch 'Release02x01'
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Oct 12, 2017
2 parents 010fc15 + 1c5967e commit a207b44
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions core/lib/Foswiki/Configure/Wizards/AutoConfigureEmail.pm
Expand Up @@ -14,7 +14,7 @@ use strict;
use warnings;

use Foswiki::Configure::Wizard ();
use Foswiki::Aux::MuteOut ();
use Foswiki::Util::MuteOut ();
use File::Temp ();

our @ISA = ('Foswiki::Configure::Wizard');
Expand Down Expand Up @@ -114,7 +114,7 @@ sub _muteExec {

{
# Don't try to capture STDERR on FastCGI systems. it won't work.
my $muter = Foswiki::Aux::MuteOut->new(
my $muter = Foswiki::Util::MuteOut->new(
outFile => $outFile,
errFile => $errFile,
reporter => $reporter,
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Contrib/core/MANIFEST
Expand Up @@ -361,7 +361,6 @@ lib/Foswiki/AccessControlException.pm 0444
lib/Foswiki/AggregateIterator.pm 0444
lib/Foswiki/Attach.pm 0444
lib/Foswiki/Attrs.pm 0444
lib/Foswiki/Aux/MuteOut.pm 0444
lib/Foswiki/Compatibility.pm 0444
lib/Foswiki/Configure/Auth.pm 0444
lib/Foswiki/Configure/Bootstrap.pm 0444
Expand Down Expand Up @@ -720,6 +719,7 @@ lib/Foswiki/Users.pm 0444
lib/Foswiki/Users/BaseUserMapping.pm 0444
lib/Foswiki/Users/HtPasswdUser.pm 0444
lib/Foswiki/Users/Password.pm 0444
lib/Foswiki/Util/MuteOut.pm 0444
lib/Foswiki/Validation.pm 0444
lib/Foswiki/ValidationException.pm 0444
lib/Foswiki/WebFilter.pm 0444
Expand Down
@@ -1,12 +1,12 @@
# See bottom of file for license and copyright information

package Foswiki::Aux::MuteOut;
package Foswiki::Util::MuteOut;
use strict;
use warnings;

=begin TML
---+!! Package Foswiki::Aux::MuteOut
---+!! Package Foswiki::Util::MuteOut
Very simplistic redirection of STDERR/STDOUT.
Expand All @@ -16,7 +16,7 @@ Simply avoid any output:
<verbatim>
use Foswiki::Aux::MuteOut;
use Foswiki::Util::MuteOut;
sub proc {
my ($dir) = @_;
Expand All @@ -25,7 +25,7 @@ sub proc {
print STDERR "RC=", $rc;
}
my $mute = Foswiki::Aux::MuteOut->new;
my $mute = Foswiki::Util::MuteOut->new;
# Nothing will be displayed by proc()
$mute->exec(\&proc, "/etc");
Expand All @@ -34,7 +34,7 @@ $mute->exec(\&proc, "/etc");
Capture output into files:
<verbatim>
my $capture = Foswiki::Aux::MuteOut->new(
my $capture = Foswiki::Util::MuteOut->new(
outFile => 'stdout.txt',
errFile => 'stderr.txt',
);
Expand Down Expand Up @@ -63,18 +63,18 @@ sub new {
( defined $params{errFile} ) ? $params{errFile} : File::Spec->devnull;

unless ( open $oldOut, ">&", STDOUT ) {
Foswiki::Aux::Dependencies::_msg( "Cannot dup STDOUT: " . $! );
Foswiki::Util::Dependencies::_msg( "Cannot dup STDOUT: " . $! );
return undef;
}
unless ( open $oldErr, ">&", STDERR ) {
Foswiki::Aux::Dependencies::_msg( "Cannot dup STDERR: " . $! );
Foswiki::Util::Dependencies::_msg( "Cannot dup STDERR: " . $! );
return undef;
}
unless ( open STDOUT, ">", $outFile ) {
Foswiki::Aux::Dependencies::_msg( "Failed to redirect STDOUT: " . $! );
Foswiki::Util::Dependencies::_msg( "Failed to redirect STDOUT: " . $! );
}
unless ( open STDERR, ">", $errFile ) {
Foswiki::Aux::Dependencies::_msg( "Failed to redirect STDERR: " . $! );
Foswiki::Util::Dependencies::_msg( "Failed to redirect STDERR: " . $! );
}

my $obj = bless {
Expand Down Expand Up @@ -110,10 +110,10 @@ sub DESTROY {
my $this = shift;

unless ( open STDOUT, ">&", $this->{oldOut} ) {
Foswiki::Aux::Dependencies::_msg( "Failed to restore STDOUT: " . $! );
Foswiki::Util::Dependencies::_msg( "Failed to restore STDOUT: " . $! );
}
unless ( open STDERR, ">&", $this->{oldErr} ) {
Foswiki::Aux::Dependencies::_msg( "Failed to restore STDERR: " . $! );
Foswiki::Util::Dependencies::_msg( "Failed to restore STDERR: " . $! );
}
}

Expand Down

0 comments on commit a207b44

Please sign in to comment.