Skip to content

x/sys/unix: add System V shared memory functions #46084

@virtuald

Description

@virtuald

Update, June 2 2021: The current proposed API is in #46084 (comment). - rsc


What did you expect to see?

It would be mildly useful to have shmget/shmat/shmdt/shmctl available in pure go. System V shared memory isn't very common in modern applications, but there are still uses for it that can't be accomplished otherwise. Usages I'm aware of:

  • X11 MIT-SHM extension uses shm to exchange image data
  • The American Fuzzy Lop fuzzer uses shm as a mechanism to communicate with the program being fuzzed.

I think the primary question I'd like to have answered is whether inclusion is appropriate for x/sys/unix and how likely it would be for it to be accepted, given that its usage is fairly esoteric.

Prior art

There are several cgo implementations I had found previously, but my google-fu is failing me at the moment. I had proposed an initial API at golang/sys#108 , but hadn't noticed the other pure go prior art in my initial search. There are several mostly pure go implementations:

cc @gen2brain

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions