Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Are filehandles flushed on a die() ?

by BazB (Priest)
on Jun 30, 2003 at 13:01 UTC ( [id://270153]=perlquestion: print w/replies, xml ) Need Help??

BazB has asked for the wisdom of the Perl Monks concerning the following question:

Greetings fellow Monks.

A quick question: are filehandles flushed correctly when perl exits following a die(), croak() or any other exception?

I'm concerned that any log messages sitting in a buffer would be lost.

Cheers.

BazB


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.

Replies are listed 'Best First'.
Re: Are filehandles flushed on a die() ?
by broquaint (Abbot) on Jun 30, 2003 at 13:06 UTC
    Indeed they are. Because die is triggered from within perl it is dealt with nicely and all the appropriate things are performed upon shutdown as it would if exit had been called (more or less).
    HTH

    _________
    broquaint

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://270153]
Approved by phydeauxarff
Front-paged by Tanalis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-19 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found