use strict;
use warnings;
+use IO::Handle;
use Amanda::Config qw( :init :getconf config_dir_relative );
sub _set_mesgout {
my $self = shift;
- my $mesgout_fd;
- open ($mesgout_fd, '>&=3') || die("Can't open mesgout_fd: $!");
- $self->{mesgout} = $mesgout_fd;
+ my $mesgout = IO::Handle->new();
+ $mesgout->fdopen(3,"a") || die("Can't open mesgout_fd: $!");
+ $mesgout->autoflush(1);
+ $self->{mesgout} = $mesgout;
}
1;