Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)  
Jim Gallacher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-13-05 07:46 AM

-1 for this patch. Actually, the patch itself is fine - it just doesn't
fix the problem. The unit tests are still failings as per my previous
messages. ie the following is getting logged in test/logs/error_log:

[Mon Sep 12 19:49:33 2005] [emerg] (2)No such file or directory:
Couldn't create accept lock

Jim

Gregory (Grisha) Trubetskoy wrote:
>
> Here's a patch (this is against 3.1.2b). Untested. This replaces GIL
> with with the APR lock.
>
> --- src/mod_python.c.orig       Mon Sep 12 16:42:28 2005
> +++ src/mod_python.c    Mon Sep 12 17:32:26 2005
> @@ -31,7 +31,9 @@
>   * (In a Python dictionary) */
>  static PyObject * interpreters = NULL;
>
> +#ifdef APR_HAS_THREAD
>  static apr_thread_mutex_t* interpreters_lock = 0;
> +#endif
>
>  apr_pool_t *child_init_pool = NULL;
>
> @@ -127,9 +129,8 @@
>      if (! name)
>          name = MAIN_INTERPRETER;
>
> -#ifdef WITH_THREAD
> +#ifdef APR_HAS_THREAD
>       apr_thread_mutex_lock(interpreters_lock)
;
> -    PyEval_AcquireLock();
>  #endif
>
>      if (!interpreters) {
> @@ -156,8 +157,7 @@
>          idata = (interpreterdata *)PyCObject_AsVoidPtr(p);
>      }
>
> -#ifdef WITH_THREAD
> -    PyEval_ReleaseLock();
> +#ifdef APR_HAS_THREAD
>       apr_thread_mutex_unlock(interpreters_loc
k);
>  #endif
>
> @@ -513,8 +513,10 @@
>          /* initialze the interpreter */
>          Py_Initialize();
>
> -#ifdef WITH_THREAD
> +#ifdef APR_HAS_THREAD
>
> apr_thread_mutex_create(& interpreters_lock,APR_THREAD_MUTEX_UNNES
TED,p);
> +#endif
> +#ifdef WITH_THREAD
>          /* create and acquire the interpreter lock */
>          PyEval_InitThreads();
>  #endif
>
>
>
>
> On Mon, 12 Sep 2005, Gregory (Grisha) Trubetskoy wrote:
> 
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:31 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register