Davin Potts <pyt...@discontinuity.net> added the comment:

Though apparently undocumented on FreeBSD, their implementation of shm_open 
differs from others in the following way:  all names for shared memory blocks 
*must* begin with a slash.  This requirement does not exist on OpenBSD.

According to its man page on shm_open, FreeBSD does at least communicate the 
following non-standard, additional requirement:
    Two processes opening the same path
    are guaranteed to access the same shared memory object if and only if
    path begins with a slash (`/') character.


Given that this requirement is not universal and because a leading slash 
controls other behaviors on platforms like Windows, it would be confusing to 
make a leading slash a universal requirement.

Likewise, requiring users on FreeBSD to be aware of this nuance would be 
contrary to the goals of the SharedMemory class.


I will prepare a patch to prepend a leading slash onto the requested shared 
memory block name and detect the need for it.

I have verified that this does solve the problem on FreeBSD and that all tests 
then pass.  I will test NetBSD and DragonflyBSD to see if they also impose 
FreeBSD's undocumented requirement.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36102>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to