Re: [patch] shmget.2: Document SHM_R and SHM_W

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

The use of SHM_R SHM_W seems to be common.
I found it in this man page date 1995 https://www.freebsd.org/cgi/man.cgi?query=shmget&sektion=2&apropos=0&manpath=FreeBSD+4.2-RELEASE
and in linux/shm.h
/* permission flag for shmget */
#define SHM_R           0400    /* or S_IRUGO from <linux/stat.h> */
#define SHM_W           0200    /* or S_IWUGO from <linux/stat.h> */

maybe that helps,

wh


Am 12.04.2019 16:27, schrieb Michael Kerrisk (man-opages):
> Nicolai,
> 
> On 4/10/19 12:21 PM, Nicolai Dagestad wrote:
>> This patch documents SHM_R and SHM_W.
>> It is made in a similar ways to how the mode flags are described in
>> open.2.
>>
>> --- shmget.2    2019-03-06 17:18:27.000000000 +0100
>> +++ shmget.2.new    2019-04-10 12:16:35.855032188 +0200
>> @@ -172,6 +172,17 @@
>>   argument of
>>   .BR open (2).
>>   Presently, execute permissions are not used by the system.
>> +
>> +The following symbolic constants are provided for mode.
>> +Theese can be
>> +.BR OR 'ed
>> +together, shifting them right by 3 set the mode for the group, and by
>> 6 set the mode for others.
>> +.TP
>> +.B SHM_R
>> +0400 user has read permission
>> +.TP
>> +.B SHM_W
>> +0200 user has write permission
>>   .PP
>>   When a new shared memory segment is created,
>>   its contents are initialized to zero values, and
> 
> These constants exist (and I think they even exist on some other
> implementations), but aren't in POSIX, and so I'm not sure it's
> sensible to document them. Or, to put things another way, why do
> you think they should be documented?
> 
> Thanks,
> 
> Michael



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux