aja: Global named semaphore is never unlinked
AJA plugin has a global named semaphore created with sem_open("/gstreamer-aja-sem", O_CREAT, S_IRUSR | S_IWUSR, 1);
. That ensures that not 2 processes can configure the device concurrently. However, that semaphore is never closed/unlinked which means the first user to create the semaphore owns it until reboot. Other users get error Failed to create SHM semaphore for GStreamer AJA plugin: Permission denied
. This is a problem in our project because the service running in prod runs under a different user (less privileged) than developers that could be running tests with e.g. gst-launch.
In addition, I think the semaphore name should include the device-identifier
property. It should be a per-device lock and not global.