X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FApplication.swg;fp=perl%2FAmanda%2FApplication.swg;h=a73a77da0697a9a46a9b9e4830056774c8299e74;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=c58cfd0f54a920549a175cd325091abcaa69d3e1;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/perl/Amanda/Application.swg b/perl/Amanda/Application.swg index c58cfd0..a73a77d 100644 --- a/perl/Amanda/Application.swg +++ b/perl/Amanda/Application.swg @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved. + * Copyright (c) 2008-2012 Zmanda, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -31,6 +31,7 @@ require Amanda::Script_App; use strict; use warnings; +use IO::Handle; use Amanda::Config qw( :init :getconf config_dir_relative ); @@ -90,9 +91,10 @@ sub read_magic_block { 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; } %}