httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: cvs commit: httpd-2.0/os/unix unixd.c unixd.h
Date Tue, 07 May 2002 21:31:08 GMT
aaron@apache.org writes:

> aaron       02/05/06 11:19:53
> 
>   Modified:    os/unix  unixd.c unixd.h
>   Log:
>   Add unixd_set_global_mutex_perms so we can set permissions on things like
>   SysV Semaphores in the core and modules.
>   
>   Revision  Changes    Path
>   1.50      +12 -0     httpd-2.0/os/unix/unixd.c
>   
>   Index: unixd.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
>   retrieving revision 1.49
>   retrieving revision 1.50
>   diff -u -r1.49 -r1.50
>   --- unixd.c	25 Apr 2002 07:18:40 -0000	1.49
>   +++ unixd.c	6 May 2002 18:19:53 -0000	1.50
>   @@ -414,6 +414,18 @@
>        return APR_SUCCESS;
>    }
>    
>   +AP_DECLARE(apr_status_t) unixd_set_global_mutex_perms(apr_global_mutex_t *gmutex)
>   +{
>   +#if !APR_PROCESS_LOCK_IS_GLOBAL

I think that should instead be

#if !APR_PROC_MUTEX_IS_GLOBAL

APR_PROCESS_LOCK_IS_GLOBAL and APR_PROC_MUTEX_IS_GLOBAL are different
things (though maybe their relationship needs to be straightened
out)...  apr_global_mutex_t is distinct from apr_proc_mutex_t if
only APR_PROCESS_LOCK_IS_GLOBAL is set, whereas it is not if
APR_PROC_MUTEX_IS_GLOBAL is set.

If it really worked, the typecast below (which hides an eventual
segfault, or at least a bogus use of storage) wouldn't be necessary:

  +#else  /* APR_PROCESS_LOCK_IS_GLOBAL */
  +    /* In this case, apr_proc_mutex_t and apr_global_mutex_t are the same. */
  +    return unixd_set_proc_mutex_perms((apr_proc_mutex_t *)gmutex);

It looks like apr_portable.h has the two confused too.

(still playing with it... hopefully this is the extent of the
confusion...)
-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...








Mime
View raw message