This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: shm_open failed:Invalid argument in glibc 2.20
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Cui Bixuan <cuibixuan at huawei dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Thu, 18 Feb 2016 13:08:42 -0500
- Subject: Re: shm_open failed:Invalid argument in glibc 2.20
- Authentication-results: sourceware.org; auth=none
- References: <56C52C92 dot 2010901 at huawei dot com>
On Wed, Feb 17, 2016 at 9:29 PM, Cui Bixuan <cuibixuan@huawei.com> wrote:
> fd = shm_open("./a", O_RDWR|O_CREAT, 00700);
This is an invalid shared memory object name for the glibc implementation.
Slashes that are not the first slash are implementation defined.
The glibc manual clearly states:
~~~
In the GNU C Library it must be a string smaller than NAME_MAX bytes starting
with an optional slash but containing no other slashes.
~~~
The fix that restricts this was for this bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=15763
Cheers,
Carlos.