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

[PATCH] check return value of close

Thread Next
From:
andreas.koenig
Date:
December 27, 2001 01:09
Subject:
[PATCH] check return value of close
Message ID:
m3666tghl0.fsf@anima.de
There seem to be myriads of these. I won't have time to cover them
all...

--- /usr/sources/perl/repoperls/perl-5.7.2@13899/ext/IO/lib/IO/t/io_dir.t	Thu Dec 27 00:32:59 2001
+++ perl-5.7.2@13899/ext/IO/lib/IO/t/io_dir.t	Thu Dec 27 10:04:25 2001
@@ -41,7 +41,7 @@
 
 open(FH,'>X') || die "Can't create x";
 print FH "X";
-close(FH);
+close(FH) or die "Can't close: $!";
 
 tie %dir, IO::Dir, $DIR;
 my @files = keys %dir;

-- 
andreas

Thread Next


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