Re: Terminating Child process Dynamically

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Wednesday, 07 March 2012 08:06:37 Perrin Harkins wrote:
> It doesn't call perl_destruct()?  I thought it did in mod_perl 1

Yes, in mp1 it did. Not so in mp2.

static apr_status_t child_terminate(void *data) {
    apr_pool_t *pool = (apr_pool_t *)data;

    /* On the first pass, re-register so we end up last */
    if (data) {
        apr_pool_cleanup_register(pool, NULL, child_terminate,
                                  apr_pool_cleanup_null);
    }
    else {
        exit(0);
    }
    return APR_SUCCESS;
}

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.