Message 336522 - Python tracker

Message336522

Author davin
Recipients davin, giampaolo.rodola, pitrou, vstinner
Date 2019-02-25.14:07:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551103638.81.0.256629353008.issue36102@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-02-25 14:07:18davinsetrecipients: + davin, pitrou, vstinner, giampaolo.rodola
2019-02-25 14:07:18davinsetmessageid: <1551103638.81.0.256629353008.issue36102@roundup.psfhosted.org>
2019-02-25 14:07:18davinlinkissue36102 messages
2019-02-25 14:07:18davincreate