develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #57512] Implicit close()s are silently unchecked for error

From:
Father Chrysostomos via RT
Date:
July 4, 2013 23:10
Subject:
[perl #57512] Implicit close()s are silently unchecked for error
Message ID:
rt-3.6.HEAD-2552-1372979415-98.57512-15-0@perl.org
On Fri Aug 01 11:02:42 2008, tom christiansen wrote:
>     (4) During global destruction, Perl chases down all the open
> handles
>         and fflush()es and fclose()s them.  Cf exit() vs _exit() in
>         libc.  This failure to report errors is most egregious on
>         STDOUT, as every program that needs to operate correctly (and
>         which ones don't?) needs must install
> 
> 	    END { close(STDOUT) || die "can't close STDOUT: $!" }
> 
>         Since this is all-but-compulsary on any program you want to
>         behave correctly, it needs to be in all programs; hence, it
>         needs to be in the run-time.

Should it be just STDOUT, or should it also apply to ARGVOUT and the
selected filehandle?

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=57512



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