You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by zhiguo zhao <zh...@gmail.com> on 2011/11/16 13:20:06 UTC

Report a Bug In truck and 2.4.x at winnt mpm, I think very important

request_rec->connection->current_thread is a new feature, and
every request_rec->connection->current_thread should have different pool,
but now with a same pool,
This is need to fix.



Index: mpm/winnt/child.c
===================================================================
--- mpm/winnt/child.c   (版本 1202642)
+++ mpm/winnt/child.c   (工作副本)
@@ -754,9 +754,11 @@
     int rc;
     conn_rec *c;
     apr_int32_t disconnected;
+    apr_pool_t* self;

     osthd = apr_os_thread_current();
-    apr_os_thread_put(&thd, &osthd, pchild);
+    apr_pool_create(&self,pchild);
+    apr_os_thread_put(&thd, &osthd, self);

     while (1) {

@@ -858,6 +860,7 @@

     ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD,
                                         (request_rec *) NULL);
+    apr_pool_destroy(self);

     return 0;
 }

Re: Report a Bug In truck and 2.4.x at winnt mpm, I think very important

Posted by zhiguo zhao <zh...@gmail.com>.
Give chance to other module save thread-scope information, Please.

在 2011年11月16日 下午8:20,zhiguo zhao <zh...@gmail.com>写道:

> request_rec->connection->current_thread is a new feature, and
> every request_rec->connection->current_thread should have different pool,
> but now with a same pool,
> This is need to fix.
>
>
>
> Index: mpm/winnt/child.c
> ===================================================================
> --- mpm/winnt/child.c   (版本 1202642)
> +++ mpm/winnt/child.c   (工作副本)
> @@ -754,9 +754,11 @@
>      int rc;
>      conn_rec *c;
>      apr_int32_t disconnected;
> +    apr_pool_t* self;
>
>      osthd = apr_os_thread_current();
> -    apr_os_thread_put(&thd, &osthd, pchild);
> +    apr_pool_create(&self,pchild);
> +    apr_os_thread_put(&thd, &osthd, self);
>
>      while (1) {
>
> @@ -858,6 +860,7 @@
>
>      ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD,
>                                          (request_rec *) NULL);
> +    apr_pool_destroy(self);
>
>      return 0;
>  }
>