Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Perl cleanup takes a long time

by ChrisR (Hermit)
on Jun 13, 2007 at 15:27 UTC ( [id://621004]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl cleanup takes a long time
in thread Perl cleanup takes a long time

Thanks Joost. I had read that in the Camel book but was a little scared to do it. It just seemed dangerous. I am not using any threads in this program so if I use POSIX's _exit(), will the memory be released made available to the system? Or have I just created another problem?
Chris Rogers
www.pcewebs.com

Replies are listed 'Best First'.
Re^3: Perl cleanup takes a long time
by Joost (Canon) on Jun 13, 2007 at 15:37 UTC
    All the resources that normally get taken back, should still be taken back by the system. The issues with _exit() AFAIK are in user-space: exit handling code that doesn't get run. From the perl view, END {} blocks will not be run, file handles won't be flushed to the kernel, DESTROY methods won't be called etc.

    You'll probably be fine if you make sure to close all file & database handles before calling _exit().

    update: see also this _exit(2) manpage.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://621004]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-20 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found