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

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

Father Chrysostomos via RT
July 4, 2013 23:10
[perl #57512] Implicit close()s are silently unchecked for error
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About