- assigned_to: nobody --> gerard
From Jt Chiodi:
Ubh does not handle a full filesystem properly. If a
filesystem fills
while ubh is running, it will continue to download and
mark as read
articles even though those articles can not be written
to the
filesystem. the open call in perl will not fail on a
full filesystem
if there are inodes free. If die is placed after a
close statement
and the print statement preceding the close statement
is printing an
entire array, the close will complete without error.
In the case of a
print statment that prints only a line at a time, the
close statement
will fail on a full filesystem.
ie..
open SOMEFILE, "<somefile" or die $!;
open OUTFILE, "<outfile" or die $!;
my @arr = <SOMEFILE>;
print OUTFILE @arr;
close OUTFILE or die "$!;
print "finished\n";
close will NOT error if filesystem is full.
open SOMEFILE, "<somefile" or die $!;
open OUTFILE, "<outfile" or die $!;
while <SOMEFILE> {
print OUTFILE @arr;
}
close OUTFILE or die "$!;
print "finished\n";
close will error if filesystem is full.
This can be fixed by putting a die statement after the
print
statement.
ie..
print PARTSFILE @{$p};
becomes
print PARTSFILE @{$p} or die "cannot print: $!";
this will fail if the print statement cannot complete
as in the case
of a full filesystem.
diff...
2152c2178
< print MSUBJECTS $match, "\n";
---
> print MSUBJECTS $match, "\n" or
die "cannot print:
$!";
2292c2318
< print PARTSFILE @{$p};
---
> print PARTSFILE @{$p} or
die "cannot print: $!";
2384c2410
< print DUMPARTICLE $_;
---
> print DUMPARTICLE $_ or die "cannot
print: $!";
2389c2415
< print DUMPARTICLE @{$body};
---
> print DUMPARTICLE @{$body} or die "cannot
print: $!";
2619c2645
< print SINGFILE @{$article};
---
> print SINGFILE @{$article} or
die "cannot print: $!";
2721c2747
< print SUBJECTS $id, "|",
$subject, "\n";
---
> print SUBJECTS $id, "|",
$subject, "\n" or die
"cannot print:
$!";
2803c2829
< print REJECT $id, "|SUBJECT|", $subject, "\n";
---
> print REJECT $id, "|SUBJECT|", $subject, "\n" or
die "cannot
print: $!";
2855c2881
< print FP_EXCLUDE "$i\n";
---
> print FP_EXCLUDE "$i\n" or die "cannot
print: $!";
2858c2884
< print FP_EXTENSION "$i\n";
---
> print FP_EXTENSION "$i\n" or die "cannot
print: $!";