Does POSIX shared memory not work for you? There's two shared memory
systems on modern UNIXes: the SysV shared memory (shmget and friends)
and POSIX shared memory (shm_open and friends).
POSIX shared memory is actually just creating a mmaping files in
/dev/shm. I think talking to the X server is the only reason to need
SysV shared memory these days.
POSIX shared memory can also be passed, capability-style, by using
file descriptors.
Cheers
AGL
Ah, does darwin not have an equivalent of tmpfs?
> Alternately, does "go build" understand platform specific code in the same
> way as the makefiles understood <file>_$(GOARCH)?
> Then I could maintain a go-installable package implementing these
> shm_open/shm_unlink for various platforms.
Yes. For example, put:
// +build linux
Near the top of the file. (See src/pkg/exp/terminal/util.go)
Cheers
AGL
Also, if the file name ends in _linux.go then you get
this for free.