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.