develooper Front page | perl.perl5.porters | Postings from December 2001

[PATCH] Check return value of close()

From:
andreas.koenig
Date:
December 27, 2001 00:41
Subject:
[PATCH] Check return value of close()
Message ID:
m3itatgivs.fsf@anima.de
As you might guess, I was running make test on a pretty full disk.

--- /usr/sources/perl/repoperls/perl-5.7.2@13899/t/base/rs.t	Thu Dec 27 00:32:50 2001
+++ perl-5.7.2@13899/t/base/rs.t	Thu Dec 27 09:30:53 2001
@@ -11,7 +11,7 @@
 open TESTFILE, ">./foo" or die "error $! $^E opening";
 binmode TESTFILE;
 print TESTFILE $teststring;
-close TESTFILE;
+close TESTFILE or die "error $! $^E closing";
 
 open TESTFILE, "<./foo";
 binmode TESTFILE;

-- 
andreas



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About