https://bugs.winehq.org/show_bug.cgi?id=54015
--- Comment #8 from Bernat Arlandis berarma@hotmail.com --- (In reply to Zeb Figura from comment #7)
(In reply to Bernat Arlandis from comment #0)
Since I guess Wine is already using Linux shared memory mechanism to implement Windows shared memory, the blocks are already available at /dev/shm but they use generic names that can't be associated to the tag used on Windows.
Not exactly; we use anonymous shared mappings instead.
Having these shared memory blocks created in the prefix directory with a name containing the tag used on creation would allow us to use it from our native applications. Or any other way to find them using the tags used on Windows.
This is not impossible in some cases, but it's also harder than it sounds. There's a bit of an impedance mismatch between NT and POSIX wrt naming: notably POSIX has a NAME_MAX restriction which doesn't apply to Windows; Windows allows all characters (including \0 I think?) except backslashes and Unix all characters except \0 and forward slashes; Windows uses UTF-16 while Unix uses a non-constant character set.
I understand. Thanks for the insight.
They don't need to be the exact same names on Linux. We could use a translation scheme like escaping non-supported characters which would gives us unique and universal translations so we always know how the name would be translated on Linux for every machine. It's not something the users have to read, it's just an id in the code to access a resource so legibility isn't an issue.