Commit cef61ebf authored by Paul Querna's avatar Paul Querna
Browse files

Move creation of the pollcb object to after we fork(), since kqueues don't...

Move creation of the pollcb object to after we fork(), since kqueues don't persist across fork(). (huh, didn't know that before)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709653 13f79535-47bb-0310-9956-ffa450edef68
parent 59d2d226
Loading
Loading
Loading
Loading
+0 −9
Changes for server/mpm/simple/simple_core.c: 0 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -63,14 +63,5 @@ apr_status_t simple_core_init(simple_core_t * sc, apr_pool_t * pool)
        return rv;
    }

    rv = apr_pollcb_create(&sc->pollcb, 512 /* pqXXXXX: make configrable */ ,
                           sc->pool, 0);

    if (rv) {
        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
                     "simple_core_init: apr_pollcb_create failed.");
        return rv;
    }

    return APR_SUCCESS;
}
+25 −0
Changes for server/mpm/simple/simple_run.c: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -261,10 +261,30 @@ static int simple_setup_privs(simple_core_t * sc)
    return 0;
}

static int simple_setup_pollcb(simple_core_t * sc)
{
    apr_status_t rv;

    rv = apr_pollcb_create(&sc->pollcb, 512 /* pqXXXXX: make configrable */ ,
                           sc->pool, 0);
    
    if (rv) {
        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
                     "simple_core_init: apr_pollcb_create failed.");
        return rv;
    }
    return rv;
}

int simple_child_loop(simple_core_t * sc)
{
    apr_status_t rv;

    rv = simple_setup_pollcb(sc);
    if (rv) {
        return rv;
    }

    rv = simple_setup_workers(sc);
    if (rv) {
        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
@@ -295,6 +315,11 @@ int simple_main_loop(simple_core_t * sc)
{
    apr_status_t rv;

    rv = simple_setup_pollcb(sc);
    if (rv) {
        return rv;
    }
    
    rv = simple_setup_workers(sc);
    if (rv) {
        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,