Commit 263bdb4b authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Get the perchild MPM working better again. I have been able to pass

some file descriptors back and forth and serve requests, but this code is
still very experimental.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87415 13f79535-47bb-0310-9956-ffa450edef68
parent 145450fe
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
APACHE 2.0 STATUS:						-*-text-*-
Last modified at [$Date: 2000/12/17 03:08:43 $]
Last modified at [$Date: 2000/12/19 01:59:53 $]

Release:

@@ -17,12 +17,6 @@ Release:

RELEASE SHOWSTOPPERS:

    * Perchild MPM doesn't build anymore.  This is still relying on the
      BUFF code, which is no longer there.  This should just be modified
      to do the passing in an input filter instead of relying on the
      post_read_request phase.
	Status: Ryan Volunteers

    * Root all file systems with <Directory /> for WIN32/OS2/NW permissions 
        Status: patch brought forward from 1.3.14
                WIN32 and OS2 need review [William Rowe, Brian Harvard]
+9 −5
Original line number Diff line number Diff line
@@ -1356,10 +1356,13 @@ static int pass_request(request_rec *r)
    apr_get_userdata((void **)&foo, "PERCHILD_BUFFER", r->connection->pool);
    len = strlen(foo);

    apr_set_userdata(NULL, "PERCHILD_BUFFER", apr_null_cleanup, 
                     r->connection->pool);

    apr_get_os_sock(&sfd, thesock);

    iov.iov_base = (char *)sconf->fullsockname;
    iov.iov_len = strlen(sconf->fullsockname) + 1;
    iov.iov_base = NULL;
    iov.iov_len = 0;

    msg.msg_name = NULL;
    msg.msg_namelen = 0;
@@ -1384,7 +1387,7 @@ static int pass_request(request_rec *r)

    write(sconf->sd2, foo, len);
   
    while (ap_get_brigade(r->input_filters, bb, AP_MODE_NONBLOCKING) != APR_SUCCESS) {
    while (ap_get_brigade(r->input_filters, bb, AP_MODE_NONBLOCKING) == APR_SUCCESS) {
        ap_bucket *e;
        AP_BRIGADE_FOREACH(e, bb) {
            const char *str;
@@ -1497,10 +1500,11 @@ static apr_status_t perchild_buffer(ap_filter_t *f, ap_bucket_brigade *b, ap_inp
            ap_bucket_read(e, &str, &len, AP_NONBLOCK_READ);
       
            if (buffer == NULL) {
                buffer = apr_pstrdup(f->c->pool, str);
                buffer = apr_pstrndup(f->c->pool, str, len);
            }
            else {
               buffer = apr_pstrcat(f->c->pool, buffer, str, NULL);
               buffer = apr_pstrcat(f->c->pool, buffer, 
                                    apr_pstrndup(f->c->pool, str, len), NULL);
            } 
        }
    }
+9 −5
Original line number Diff line number Diff line
@@ -1356,10 +1356,13 @@ static int pass_request(request_rec *r)
    apr_get_userdata((void **)&foo, "PERCHILD_BUFFER", r->connection->pool);
    len = strlen(foo);

    apr_set_userdata(NULL, "PERCHILD_BUFFER", apr_null_cleanup, 
                     r->connection->pool);

    apr_get_os_sock(&sfd, thesock);

    iov.iov_base = (char *)sconf->fullsockname;
    iov.iov_len = strlen(sconf->fullsockname) + 1;
    iov.iov_base = NULL;
    iov.iov_len = 0;

    msg.msg_name = NULL;
    msg.msg_namelen = 0;
@@ -1384,7 +1387,7 @@ static int pass_request(request_rec *r)

    write(sconf->sd2, foo, len);
   
    while (ap_get_brigade(r->input_filters, bb, AP_MODE_NONBLOCKING) != APR_SUCCESS) {
    while (ap_get_brigade(r->input_filters, bb, AP_MODE_NONBLOCKING) == APR_SUCCESS) {
        ap_bucket *e;
        AP_BRIGADE_FOREACH(e, bb) {
            const char *str;
@@ -1497,10 +1500,11 @@ static apr_status_t perchild_buffer(ap_filter_t *f, ap_bucket_brigade *b, ap_inp
            ap_bucket_read(e, &str, &len, AP_NONBLOCK_READ);
       
            if (buffer == NULL) {
                buffer = apr_pstrdup(f->c->pool, str);
                buffer = apr_pstrndup(f->c->pool, str, len);
            }
            else {
               buffer = apr_pstrcat(f->c->pool, buffer, str, NULL);
               buffer = apr_pstrcat(f->c->pool, buffer, 
                                    apr_pstrndup(f->c->pool, str, len), NULL);
            } 
        }
    }