I run all my stuff in FreeBSD jails which used to make things even more complicated, because
SYSV IPCstuff wasn't namespaced, so two jails with
allow.sysvipc=1could see and modify each others shared memory and semaphores - not ideal. In FreeBSD 11 and beyond this is no longer an issue, as I will demonstrate later in this post.
Source: FreeBSD, Jails and SYSV IPC, an article by Thomas Steen Rasmussen.