httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] 1.3: changing accept mutex for Cygwin
Date Sun, 13 Jan 2002 12:44:00 GMT
Stipe Tolj <tolj@wapme-systems.de> writes:

> Attached is a patch that fixes a bug for the accept mutex on the
> Cygwin platform. The bug was reported by Sami Tikka
> <sami.tikka@welho.com> while trying to use multiple Listen directives.
> 
> We change the accept mutex from fcntl to pthread, which works even
> with several Listen directives set in httpd.conf.
> 
> Here are the changes:
> 
>   * src/include/ap_config.h: adding HAVE_PTHREAD_SERIALIZED_ACCEPT to
> Cygwin block and defaulting to it.
> 
>   * src/main/http_main.c: exluding pthread_mutexattr_setpshared() call
> for Cygwin platform. This calls seems yet not fully functional on this
> platform. Forwarding problem to Cygwin core developers.

Are you sure you have proper mutexing now?  By default, pthread mutexes
are only useful within the current process.  Cygwin isn't the only
platform that fails PTHREAD_PROCESS_SHARED.  Such a failure is
supposed to mean that the mutexes are only useful within the current
process.

It seems to me that you may not have any effective mutexing (since the
mutex each of your processes tries to grab is not the same mutex
grabbed by other processes since each process has its own local mutex
due to PTHREAD_PROCESS_SHARED failing).

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message