httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: svn commit: r1702450 - /httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
Date Fri, 11 Sep 2015 13:44:02 GMT
On Fri, Sep 11, 2015 at 3:14 PM, Ruediger Pluem <rpluem@apache.org> wrote:
>
> On 09/11/2015 03:00 PM, ylavic@apache.org wrote:
>>
>>  #include "httpd.h"
>>  #include "http_main.h"
>> -#ifdef AP_NEED_SET_MUTEX_PERMS
>> -#include "unixd.h"
>> -#endif
>> -
>> -#if APR_HAVE_UNISTD_H
>> -#include <unistd.h>         /* for getpid() */
>> -#endif
>> -
>> -#if HAVE_SYS_SEM_H
>> -#include <sys/shm.h>
>> -#if !defined(SHM_R)
>> -#define SHM_R 0400
>> -#endif
>> -#if !defined(SHM_W)
>> -#define SHM_W 0200
>> -#endif
>> -#endif
>>
>
> Why can the above be removed and how is this related to what you try to fix?

There is no Unix specific code (anymore?) in the module, these macros
(and getpid) are used nowhere.
This is moderatly related to the commit I agree (though Unixes vs
Windows somehow), that's why I also mentionned the change in the
commit message ("This commit also axes unused Unix specifics about
mutexes/semaphores.")...


>
>>  #define AP_SLOTMEM_IS_PREGRAB(t)    (t->desc.type & AP_SLOTMEM_TYPE_PREGRAB)
>>  #define AP_SLOTMEM_IS_PERSIST(t)    (t->desc.type & AP_SLOTMEM_TYPE_PERSIST)
>> @@ -59,6 +42,7 @@ typedef struct {
>>
>>  struct ap_slotmem_instance_t {
>>      char                 *name;       /* per segment name */
>
> name now stores the filename. Maybe that should reflected in the comment?

It was already storing the filename before (the leading '/' was used
to shortcut ap_runtime_dir_relative() only).
But yes, the comment needs to be changed, will do it.

Thanks for the review.

Mime
View raw message