diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-01-25 09:00:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-01-25 09:00:11 +0000 |
commit | 31015b6c29b06120bd8d52d261cbb114915bb556 (patch) | |
tree | ae330ef1bd8541627c77768472931c0eb7da709e | |
parent | 9dcda981bc33d9fb4e9b26acb9191600248842e2 (diff) | |
download | urpmi-31015b6c29b06120bd8d52d261cbb114915bb556.tar urpmi-31015b6c29b06120bd8d52d261cbb114915bb556.tar.gz urpmi-31015b6c29b06120bd8d52d261cbb114915bb556.tar.bz2 urpmi-31015b6c29b06120bd8d52d261cbb114915bb556.tar.xz urpmi-31015b6c29b06120bd8d52d261cbb114915bb556.zip |
cleanup
-rwxr-xr-x | urpmi | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -285,26 +285,22 @@ if ($logfile && !$INC{"Devel/Trace.pm"}) { #- fork twice to copy stdout and stderr to $logfile unless ($pid_out = open STDOUT, "|-") { - local $_; - while (<STDIN>) { - open my $fh, ">>$logfile"; select $fh; $| = 1; - select $SAVEOUT; $| = 1; - $/ = \1; - print $SAVEOUT $_; - print $fh $_; - close $fh; + select $SAVEOUT; $| = 1; + $/ = \1; + while (my $s = <STDIN>) { + open my $fh, ">>$logfile"; + print $SAVEOUT $s; + print $fh $s; } exit 0; } unless ($pid_err = open STDERR, "|-") { - local $_; - while (<STDIN>) { - open my $fh, ">>$logfile"; select $fh; $| = 1; - select $SAVEERR; $| = 1; - $/ = \1; - print $SAVEERR $_; - print $fh $_; - close $fh; + select $SAVEERR; $| = 1; + $/ = \1; + while (my $s = <STDIN>) { + open my $fh, ">>$logfile"; + print $SAVEERR $s; + print $fh $s; } exit 0; } |