This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients davin, eryksun, pitrou, vinay0410
Date 2019-08-20.15:16:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566314186.43.0.416576096662.issue37754@roundup.psfhosted.org>
In-reply-to
Content
> PS: I personally believe from my experience that shared memory 
> segments should outlive the process, unless specified otherwise. 
> Also, a argument persist=True, can be added which can ensure 
> that the shared_memory segment outlives the process, and can be 
> used by processes which are spawned later.

In terms of providing "consistent behavior across platforms that can be reasonably supported", the behavior suggested above could not reasonably be supported in Windows. 

The Section (shared memory) object itself is not a file. It gets created in the object namespace, either globally in "\BaseNamedObjects" or in an interactive session's "\Sessions\<session ID>\BaseNamedObjects". 

By default, kernel objects are temporary. Creating permanent named objects requires SeCreatePermanentPrivilege, which by default is only granted to SYSTEM (sort of like root in Unix). For an object to be accessible across sessions and outlive an interactive session, it needs to be global. Creating global Section objects requires SeCreateGlobalPrivilege, which by default is only granted to administrators and service accounts.

Also, the Windows API has no capability to create permanent objects, so this would require the NT API functions NtMakePermanentObject (undocumented, added in NT 5.1) and NtMakeTemporaryObject.
History
Date User Action Args
2019-08-20 15:16:26eryksunsetrecipients: + eryksun, pitrou, davin, vinay0410
2019-08-20 15:16:26eryksunsetmessageid: <1566314186.43.0.416576096662.issue37754@roundup.psfhosted.org>
2019-08-20 15:16:26eryksunlinkissue37754 messages
2019-08-20 15:16:25eryksuncreate